There are several parts involved in creating and displaying those profiles you see in Lync’s contact window. When one of them misbehaves, you see the effects right away. Inaccurate phone number. Wrong Presence status. Missing contact photo.
We recently had this happen to a recent client’s Lync Server. The initial setup went fine. Lync pushed out to users. IMs were sent, phone calls were made.
Then some users put their own contact photos into their Lync profiles. Management wanted to standardize all of the photos, so every customer saw the person they were working with.
They called us up and asked, how do we do that?
Updating Lync Contact Profiles Via Active Directory
Let me back up a bit to explain.
Lync’s contact profiles get a lot of their data from Active Directory. Changes to AD are replicated to the back-end SQL Server used by Lync.
For example, a user’s work phone number is changed in AD. Lync replicates that to its back-end. (This service is called the User Replicator Configuration. You can determine its replicating interval with the PowerShell cmdlet Get-CsUserReplicatorConfiguration.)
Once a day (the default is 1:30 AM) the changes in SQL Server are synchronized to Lync’s Address Book Server. This is also configurable via PowerShell. To see its settings, run Get-CsAddressBookConfiguration.
If the synchronization results in new or changed user information, the Lync client downloads it into its local cache files.
Ta da! Your Lync contacts display the new information.
So if we wanted to standardize all the contact photos in users’ Lync profiles, the best place to do it is in Active Directory, right?
Setting Lync to Display Active Directory-based Photos By Default
In the “My Picture” section of Lync 2010’s Settings, you have three options.
- Do not show my picture
- Default corporate picture
- Show a picture from a web address
Option #3 is what people use to set their own photo. However, Option #2 is what we’re after. It will be populated by Active Directory once we’re done updating.
Add new contact photos to Active Directory users whatever way you prefer (several management tools exist). Once the photos are in place for Active Directory users, they will synchronize with Lync like I described above.
(Remember, contact photos must be less than 100kb in order for Lync 2010 to use them.)
But we’re not quite done here. If some users have set Option #3 in Lync, we’ll have to change them to #2. Talk about a pain, going from system to system…
Oh wait! There’s a PowerShell cmdlet for that.
The Set-CsClientPolicy cmdlet has an option, “-DisplayPhoto” which controls the default photo display options. With it, we disabled Option #3 above. This requires Lync to use Active Directory’s stored image for its contact photo. The cmdlet is structured like so:
Set-CsClientPolicy -Identity PhotosControl -DisplayPhoto PhotosFromADOnly
Then, run the cmdlet Update-CsAddressBook. This runs a synchronization from the Lync SQL database into your Lync clients. So you don’t have to wait all day for the new photos to display.
Justin Morris did a great breakdown of Lync photo controls here, if you want to read more.
Getting a Sync Error
“Cannot Synchronize Address Book.”
Some of the Lync clients did display the new contact photos. However many didn’t, and gave this error instead.
Unfortunately, this error is very open-ended. I’ve run across at least six potential causes–not all of which are directly related to the Address Book!
The most common solution is for us to force the Lync client to refresh. Makes sense to try that first.
Sync Fix #1: Delete GalContacts.db and GalContacts.db.idx
In order to force a refresh, we must force the Lync client to re-download its profile information from the Front End pool. Including contact photos.
Here’s how you do that.
- Shut down a user’s Lync client.
- Navigate to that user’s Lync client folder on their computer. It’s found at “C:Users%UserName%AppDataLocalMicrosoftCommunicator”
- Open the “sip_%username%@domain” folder. You’ll find a list of cache files.
- Delete the Galcontacts.db and galcontacts.db.idx files. These are contact database files.
- If Lync Server is configured properly, the files will automatically download again after you reopen Lync.
- Reopen Lync 2010. Allow a few minutes for it to synchronize.
But wait. It still didn’t work. The client’s contact photos are not showing.
All other information is up-to-date. The Active Directory sync is working…just not for images?
Looks like we’ll have to dig a little deeper. And that means…multi-part post!
(Turns out we had to go through a lot of back-and-forth repair attempts on this one, before it all worked out. There’s a lot of parts to the Lync contact profile – and by the time we were done, we’d touched all of them.)
Next post I’ll detail 3 more fixes we tried. Two had no effect on synchronizing the address book…but one did.
Have you encountered an Address Book synchronization error? What solution worked for you?