The overall process is basically the same as what Office Communications Server does, but with added flexibility of easily customizing some of the timing of the different events. The entire process happens over time based on a number of intervals, and by default looks like this:
- Changes performed on Active Directory objects are automatically synchronized by the LS User Replicator once every 60 seconds. These changes are written into the back-end SQL database for the pool as well as the rtcab database which is used by Address Book Web Query service for the Lync 2010 Mobile client.
- Once every 24 hours (1:30AM local server time) the LS Address Book Server will execute a synchronization pass which pulls the most recent information stored in the SQL rtc database and writes those changes into the address book files.
- On a randomized schedule the Lync client and Lync Phone Edition clients download any updated .lsabs and .dabs files from the Lync Server’s share to update the client’s local GalContacs.db cache file.
- Just as with OCS there are many scenarios when waiting a ‘day or so’ to see changes appear in the contact list are less than ideal, so the manual steps have been outlined in detail in this article.
Understanding the Process
The first two items on the list above are both server-side processes are are controlled individually by separate Set and Update cmdlets. Since PowerShell cmdlets are now used for any and all configuration this means that separate command-line tools like lcscmd.exe or abserver.exe are no longer used in Lync Server. The ‘abserver.exe –RegenUR’ command has been replaced by Update-CsUserDatabase and the ‘abserver.exe –SyncNow’ command has been replaced by Update-CsAddressBook.
- Let us first look at the User Replicator configuration, which is the process which synchronizes data between Active Directory and the Lync SQL databases.
- Execute the Get-CsUserReplicatorConfiguration cmdlet.
PS C:\> Get-CsUserReplicatorConfiguration
Identity : Global
ADDomainNamingContextList : {}
ReplicationCycleInterval : 00:01:00
The ReplicationCycleInterval value indicates the default behavior of Lync Server to search Active Directory for any changes every minute. This interval is 1 minute by default and can be customized to any value between 1 second and 24 hours.
The second half of the server-side process is controlled by the Address Book Service which pulls information from the SQL database and writes the changes to the address book files.
- Execute the Get-CsAddressBookConfiguration cmdlet.
PS C:\> Get-CsAddressBookConfiguration
Identity : Global
RunTimeOfDay : 1:30 AM
KeepDuration : 30
SynchronizePollingInterval : 00:05:00
MaxDeltaFileSizePercentage : 20
UseNormalizationRules : True
IgnoreGenericRules : False
EnableFileGeneration : True
Noteworthy here are the SynchronizePollingInterval and RunTimeofDay settings. The default RunTimeofDay value of 1:30 AM is the same setting that OCS used and is still indicative of the one time per day that Lync Server automatically updates the address book files automatically.
The SynchronizePollingInterval is how often the abserver.exe process checks for a pending synchronization event. Basically when the Update-CsAddressBook cmdlet is run then a ‘synchronize now‘ event is marked and the update is not actually run immediately. The event itself happens the next time abserver looks to see if a sync event has been triggered. This polling interval is 5 minutes by default and can be customized to any value between 5 seconds and 3 hours.
Update Servers
Because Step #1 in the process happens by default every minute then any recent changes in AD should already be imported into the SQL database. If this is not the case or for some reason normal replication is failing then a manual process can be used to toss out the entire copy of AD information in the SQL database’s address book store and regenerate a completely new copy. To rebuild Lync’s copy of the AD data simply use the Update-CsUserDatabase cmdlet. Be aware that is stuff is more process intensive than the automatic delta synchronization. This step should not be necessary under normal circumstances.
In the time it took to read the previous paragraph Lync Server should have synchronized and outstanding changes in Active Directory and Step #2 can be manually processed.
- Execute Update-CsAddressBook to trigger the Lync Server to synchronize current Active Directory information in the SQL database into the downloadable client and device address book files. (The -verbose switch was used in the example below to display the informational text; it is not required when running the cmdlet.)
- After 5 minutes check the Lync Server event log on the server for a group of LS Address Book Server event reporting the results of the update command.
-
The contents of the four LS Address Book Server informational events show the triggered update and the results. The number of OC delta files written” shows that 40 new contacts were created, reflecting the new user accounts previously added into Active Directory and enabled for Lync Server.
Event ID: 21005
Description:
Synchronization pass started.Event ID: 21010
Description:
Synchronization pass completed successfully. Address Book web service backend data partition = RtcAb1Event ID: 21056
Description:
Synchronization Pass Summary.
Sync pass completed with 11 contacts processed
Number of separate AD partitions: 1
Number of valid contacts: 11
Number of empty contacts: 0
Number of invalid contacts: 0
Number of cached photos deleted: 0
Number of stale OC files deleted: 0
Number of OC full files written: 1 with 11 total contacts
Number of OC delta files written: 8 with a total of 40 new/updated contacts and 0 deleted contacts.
Number of OC bytes written: 10,072 compressed to 7,134 bytes on disk.
Number of stale device files deleted: 0
Number of device full files written: 1 with 0 total contacts
Number of device delta files written: 11 with a total of 0 new/updated contacts and 0 deleted contacts.
Number of device bytes written: 1,657 compressed to 1,248 bytes on disk.Event ID: 21004
Description:
Next synchronization pass will start at: 9/24/2010 1:30:00 AM
Update Clients
Just as Office Communicator has done since a later R2 hotfix, Lync also will not immediately download changes to the Address Book files when first launched, but instead wait for a random interval of time between 1 and 60 minutes. To trigger an immediate download two steps must be taken on the client workstation. The first step only needs to be performed once per workstation, while the second would be done each time a forced update is desired.
- First, execute the following command from the Windows Command Prompt run as an administrator (or manually add the GalDownloadInitialDelay registry key). Setting this value to 0 will force Lync to immediately download the address book instead of randomly selecting a time to check the server.
reg add HKLM\Software\Policies\Microsoft\Communicator /v GalDownloadInitialDelay /t REG_DWORD /d 0 /f
Take note that the there is another difference here between the Lync and Communicator clients. For standard 32-bit operating systems the registry path below is the same regardless of the client versions (OC 2007 R2 with July 2009 update or Lync 2010 RC) but previously 64-bit operating systems running the 32-bit only OC 2007 R2 client had to have the setting created under the Wow6432Node policies key.
- Second, exit the Lync client and manually delete the GalContacts.db and GalContacts.db.idx files from the user’s profile directory. If the .db file still exists during startup of the client then Lync may still wait for that random interval between 0 and 60 minutes before checking for changes on the server’s address book files. By deleting the file the Lync client must download an entire new copy, forcing it to pick up any changes.
On Windows XP workstations:
%userprofile%\Local Settings\Application Data\Microsoft\Communicator\sip_<username@domain>\
On Windows Vista or Windows 7 workstations:
%userprofile%\AppData\Local\Microsoft\Communicator\sip_<username@domain>\
- Restart the Lync client and search for any of the recently changed information, for example the Telephone Number added to this AD user account now appears for the Lync contact.
[…] Updating the Lync 2010 Address Book : Jeff Schertz’s Blog Posted on September 28, 2010 by johnacook http://blog.schertz.name/2010/09/updating-the-lync-2010-address-book/ […]
[…] After 5 minutes have elapsed force an address book update on the Lync client as described in this previous article. […]
[…] update the address book files using the process detailed in this previous article. Now all standard modalities should be available between the clients, including IM/Presence, […]
Jeff,
Great article. I have performed all these steps, and I still have the same issue. The Galcontacts.DB and IDX files are NOT being created on my client machines (winXP in this case)
Any ideas?
Chris,
Are you still running into this issue or has the AB succesfully synced by now? If not I would recommend you post your question in this TechNet discussion forum.
Great article, worked for me.
Thanks
[…] the Exchange UM integration Utility and force an address book update in a Lync client to verify the new Exchange contacts. Depending on the AD forest […]
You're article has got to be the most useful article I have read. The address book problems have plagued me for hours!
[…] Updating the Lync 2010 Address Book: http://blog.schertz.name/2010/09/updating-the-lync-2010-address-book/ […]
[…] Updating the Lync 2010 Address Book: http://blog.schertz.name/2010/09/updating-the-lync-2010-address-book/ […]
[…] book but this workstation has been configured for immediate download using the process detailed in this previous article.) GET /abs/handler/F-0e21.lsabs – 443 sip:Kristina@mslync.net 192.168.103.104 […]
[…] photo won’t display in the Lync client right away though. As per this the ABServer in Lync 2010 has an update pass every night at 01:30AM Server time, just as in […]
Thanks, Great article. This worked for me.
Jeff
Nice article, however even if i use Update-CsUserDatabase cmdlet not all active directory users are synchronize to the GAL, there are still some AD users that are missing…any ideas?
If those 'missing' user accounts are not SIP enabled or do not include popultaed phone number attributesthen they will not appear in the Lync address book as there is nmo functionality related to those accounts then.
users that are missing in the Lync address book has the same attributes with the enabled lync users..any ideas…thanks a lot
Jeff
this solve my problem http://technet.microsoft.com/en-us/library/gg3981…
i never knew that there was a configuration of ocs 2007 before.
thanks a lot jeff
Great Post…Thanks Jeff…This has been a bit of mystery for us since the R2 days. It's all good now..
[…] After 5 minutes have elapsed force an address book update on the Lync client as described in this previous article. […]
Is the Lync2010 client supported with Office 2010 64-bit on Windows 7 64-bit?
In this configuration the client will not search the Exchange GAL, only the local Outlook Contacts.
I’ve performed the steps detailed in this note and manually opening the GAL Status webpage from IE produces the correct result.
Any suggestions?
Yes, it's supported and that is the same configuration I'm running on my primary workstation.
Great article Jeff…..
[…] After 5 minutes have elapsed force an address book update on the Lync client as described in this previous article. […]
Great post Jeff, it worked like a charm.
Thank you.
Good post. Do you recommend HKLM or HKCU for GalDownloadInitialDelay . I have seen it posted both ways on the blogs.
Thanks! worked mee too!
Great post Jeff, Thank you!! .
This does not seem to work on Windows 7
Make sure you are using the correct registry key location between the 32-bit and 64-bit versions of Windows 7, you probably have the settings in the wrong place. I've run this process almost exclusively on Windows 7 workstations at this point and the screenshots are from a W7 PC.
Hi Jeff- Thanks for the great article(s). I wanted to know if you have any information regarding the entire address book process for external clients. I recently added a server to my enterprise pool and removed a server from the pool. The server I removed was the first server built in my Lync implementation. Since then, external clients have not been able to download the address book files. I moved both the internal and external web sites, prior to removing the first server. Now I'm trying to check everything from the firewall ports to certificates to servers. Any info on the actual AB query/download would be greatly appreciated.
Have you verified that the file share is still functional or was it lost/disconnected during the Front End server swap?
Thanks so much for the reply.
Yes, I did verify that the file share was connected and accessable. I just rant Enable-CsComputer, to repair any permissions that may have needed it.
I do also get a "Distribution Group Service is Unavailable…" on the client, as well. I think that the error can be generated if there's a problem with the URL publication. I've checked my ISA config and everything is good. Do you have any other ideas as to which components I can check?
I have read that when a Lync client starts it will sync its address list at a random interval between 1 and 60 minutes and adding the GalDownloadInitialDelay /t REG_DWORD /d 0 /f reg key will allow us to sync it immediately rather than have to wait the random interval.
My question is, if we set the GalDownloadInitialDelay reg key to 0 which means the Lync client should be updating is Address List immediately, why do we have to delete the GalContacts.db. I guess i am confused why we need to delete the GalContacts.db. I figured that setting the reg key and simply restarting the lync client would force the update.
Any help would be appreciated.
Mike
Hi Mike,
Did you manage to get anywhere with this as I have the same issue. Any new users are not updating to the local copies of the Address book. If I delete the two files (galcontacts.db and .idx) then I can see all users but then any subsequently created users are not downloaded, even after ruuning and Update Address book command. I can find new usersby using their name@domain.com but not just name.
If anyone has resolved this it would be very helpful,
Thanks
Paul.
You are Great. Struggling for 10 hours now. You have saved my job. It is working now.
Great article. It help us figure out why we had many inconsistencies in address books. However, our experience was that there still were some locally cached data on the client-side that wasn't fully cleared by just deleting the Gal*.db files. We deleted all of the files in the profile directory and that took care of the inconsistencies.
[…] Läs mer på Jeff Schertz blogg om Lync 2010 adressbokstjänst […]
Hey Jeff,
This is definitely a very helpful article…Thanks a bunch!
I was wondering if you knew the answer to something I've been battling concerning the Address Book.
I have clients that essentially never log out or off of the network, therefore leaving their PC's "locked" overnight each night, which means their Lync client remains logged in as well.
For these users who remain logged into Lync for week on end, how and when does their local address book get updated? I know logging out and then back in triggers it, but I'm looking to find out what process takes places for updating Lync users who remain logged in all th time….because I have to believe that it does happen and is "supposed" to happen. We have our AB set for WebSearchandFileDownload currently.
Can you shed some light on this for me?
Thanks,
B
The clients will update changes to the address book files are some amount of time and are not required to sign-out. I do not know what this time interval is though as it's not configurable and is hard-coded into the client. I've heard it's roughly ~24 hours but I do not think that is an exact interval.
thanks really helpful
Great aricle, it works for me too.
Any ideas how to perform these on a mac ?
No, I don't believe the behavior of the new Lync:mac client can be controlled like the Windows client.
Really useful article
[…] Force a manual update of the Lync Address Book as shown in this previous article. […]
I have the same problem as TygaB, was there any reply to this answer
"I have clients that essentially never log out or off of the network, therefore leaving their PC's "locked" overnight each night, which means their Lync client remains logged in as well.
For these users who remain logged into Lync for week on end, how and when does their local address book get updated? I know logging out and then back in triggers it, but I'm looking to find out what process takes places for updating Lync users who remain logged in all th time….because I have to believe that it does happen and is "supposed" to happen. We have our AB set for WebSearchandFileDownload currently.
Can you shed some light on this for me? !
The client do not need to be logged out as it will automatically check for updates. There is no configurable delay for this and it happens roughly every 24 hours but that is just an estimated value as it depends on a number of factors.
how can I read the .lsabs file?
Craig, you can use the abserver command with the -dumpFile parameter to convert the Address Book files into plain text.
[…] Manually update the address book files using the process detailed in this previous article. […]
Thanks for this post. Closing Lync and then deleting the GalContact.db and .idx refreshed the Lync client. The new user is now visible and can communicate.
Why can't they (Microsoft) build something decent that just get's updates from AD of new accounts since the last refesh every time the client loads.
Honestly I've never understood why a more friendly and flexible process was not developed for this. It's still cumbersome when any manual intervention is required (which can be often).
What a brilliant article! Been waiting for some time to setup a Lync 2010 lab and finally achieved it after following your series of articles. I'll definetly be book marking your site and checking back regularly for updated articles.
Well done for putting together such a fantastic resource.
Address Book Server has encountered an unexpected exception.
Exception: Unable to initialize DBOutputSink – System.Data.SqlClient.SqlException: Cannot open database "RtcAb1" requested by the login. The login failed.
Login failed for user 'NT AUTHORITYNETWORK SERVICE'.
why I got this error ??? Lync standard server, windows 2008 R2
did you find solution to that problem? Can you write some instructions what to du.
I’m experiencing same problem.
Thanks in advance
[…] attribute populated, and the contact should be added to the address book on the next synchronization pass. I’ve made a script to create this kind of […]
Hi Jeff,
Thanks for the great article. Just had a quick question on a related topic. What specific msRTCSIP attribute does the Lync AB server look for in a user's AD account when deciding whether a user is included in the Lync Address Book?
Aviviere
The ABS service does not look at a single attribute, it looks at multiple ones. It checks to see if the the Primary SIP and/or phone number fields are populated, as well adhering to the 'msExchangeHideFromAddressLists' setting provided by the Exchange server schema.
Hi Jeff,
Are there any other attributes you know of?
I've enabled websearchonly (note fiileddownloadwebsearchonly produces the same result), and can see users when using the search function that don't have primary SIP or phone number fields populated, and aren't hidden from the address book.
In pilot phase at the moment, and I'm getting asked/trying to narrow down what other attributes might also be ?
queried.
Any ideas?
Great articles by the way, I use them often a reference. 🙂
Thanks for great Article
it works for me
Hello ,
The Registru key should be HKCU and not HKLM , the entry must be under Current User in this case :
(reg add HKCUSoftwarePoliciesMicrosoftCommunicator /v GalDownloadInitialDelay /t REG_DWORD /d 0 /f)
http://technet.microsoft.com/en-us/magazine/hh824…
You can use either hives to define the setting, it does not have to be in the Current User location. I typically recommend using HKLM as then any windows user that signs on the workstation will get the address book faster, but if you want to configure users individually then HKCU will work as well.
[…] Jeff Schertz has an excellent blog entry on the process that is used to update the Lync address book and how to force the Lync clients to update – see Updating the Lync 2010 Address Book. […]
[…] objects in Active Directory doesn’t immediately reflect in Lync. According to resources (http://blog.schertz.name/2010/09/updating-the-lync-2010-address-book/), the LS Address Book Server will execute a synchronization pass which pulls the most recent […]
A quick walk through of Lync contact card configuration…
Let’s pick a default new Lync deployment for example: Assign below information to new user…
I don't get the praise for this article. It seems like like a horrible kludge to a common problem. A better article would apologize profusely and point to a download that would fix what appears to must users like a very frustrating bug that must have been obvious to MS.
Well for starters I didn't write the software so not sure why I would have to apologize for anything Microsoft has produced. Secondly this is not a bug as the original client behavior was to immediately download the address book which caused problems after large deployments or migrations where hundreds or thousands of users would sign-in around the same time the next morning and subsequently slam the OCS server with requests for all address book files. So the clients now select random times to prevent a flood of requests at the same time. IMO the proper approach would be to have the Lync client fall-back to using the AB Web Query process in the event that the Address Book files have not yet been requested an cached locally, but this has not been implemented thus far.
Great, stuff worked for me ( Windows 7 ver. ) Thhanks..
Hi all,
My Lyncshare folder is on a Netapp server and I have full control over Lyncshare folder but still no address book in the 1-WebServices-1ABFiles folder.
Do any of you experience same problem?
Do any of you knows if there is some issue with NetApp file structure?
I have Lync standard edition server Only IM and presence is roles are activated.
Lync Server and lync client is working but getting error messages on lync server event logs that
Address Book Server has encountered an unexpected exception. With Event Id: 21046
Folders are created under lyncshare but they are not populated with information.
Please Help
I know that the recent CU5 release has included support for DFS on the Lync share but I do not know if using SAN or NAS storage is supported for this.
Jeff – the article seems to be logical to the sync issue, however when in the case of GAL look-up the request protocol is what i suspect to be the trouble. I'll try few more, and post my updates if I get a fix.
Hi Jeff – can you configure Lync to not scan certain OUs for AB information?
You can hide individual items from the address book as well as move entire groups of Lync objects into a separate address book, see this article for more details.
[…] attribute populated, and the contact should be added to the address book on the next synchronization pass. I’ve made a script to create this kind of […]
Enabling Users for Lync…
To enable users for Lync, you need to be a membe…
[…] Updating the Lync 2010 Address Book: http://blog.schertz.name/2010/09/updating-the-lync-2010-address-book/ […]
A little tip if you experience that specific users AD (corporate) picture isn't showing up in Lync.. Check to see if the user is hidden from Address Lists..
The Attribute in the AD object is called: msExchHideFromAddressLists
If this is TRUE for the user, the AB Service doesn't include this..
Can of course also be checked with EMC and EMS:
Get-Mailbox alias | fl HiddenFromAddressListsEnabled
Used the C:\Program Files\Microsoft Lync Server 2010\Server\core> .\ABServer.exe -dumpFile to conclude this..
-Jonas
[…] Updating the Lync 2010 Address Book : Jeff Schertz’s Blog Like this:LikeBe the first to like this. […]
Great Article – worked first time – thanks for the info !!
Deleting the galcontacts.db and galcontacts.db.idx seems to work for us, but is there a way to do this to the whole company, and easily? I don't want to have to go to 125 computers in 6 states to do it manually 🙂
Nothing is provided within Lync Server for this, but any solution (scripts or third-party apps) that can access the workstation's file system and delete files would work.
Lync…
Description Microsoft Lync is a communications pac…
This worked great! Thanks for the tip!
Hi Jeff – we have implemented the lync server standard edition. i want to know if its possible to configure lync client to search only lync enabled users on the search tab or any server configuration to merge contacts only with lync enabled users rather than all the users in AD or outlook contacts?
thanks.
KN
You can modify which types of objects Lync will sync from AD to reduce what appears in the Address Book files, but to remove personal Outlook contacts you'd have to de-select Outlook as the Personal Information Manager option in the Lync client which would break other Outlook integration features.
hi,
I am unable see contact details for number in search results for number, can anyone suggest me how to do configurations in server so that contact details are displayed for number
[…] http://blog.schertz.name/2010/09/updating-the-lync-2010-address-book/ […]
Good article. I find it annoying that it will only write further data to the local copy of the address book. If you change phone number at some point, everyone in the company will have that number stored and probably as default for you forever. You can then delete the local copy on each client, but if you're a big company and employees change numbers frequently due to harassment or something similar, then this approach is just not good enough. You end up having the Lync client fetching a new local copy every morning for 30 minutes, where the employees can't search for colleagues or really use Lync.
It's amazing to me, that Microsoft has no better way of handling this. Why doesn't it both write to and delete from the local copy, so that obsolete data is removed 🙁
Lab Tips…
Lab tips Number format of contacts in Active Direc…
[…] http://blog.schertz.name/2010/09/updating-the-lync-2010-address-book/ […]
[…] The current IIS log shows the following GET entry when a default client connection is established and the Address Book is retrieved or updated. (By default the Lync client can wait up to 60 minutes to download the address book but this workstation has been configured for immediate download using the process detailed in this previous article.) […]
How do you change the RunTimeof Day to 5am?
The ABSConfig.exe tool can modify the time of day that the 24-hour sync process is executed. You can find it in the Lync Server 2013 Resource Kit Tools.
thanks, it worked for me
The perfect one! it has fixed the issues. Thanks a ton 🙂
i didn't have these files on my new computer (GalContacts.db.idx and GalContacts.db), so i coppied them from my previous computer and it worked.
[…] You can find some more insights about “Updating the Lync 2010 Address Book” here. […]
Great article. You would think the address book from the client side would work better than having to go to a users machine and manually deleting galcontacts. Whats everyone's opinion on this? Im even tempted to script deleting the galcontacts files before lync is open.
[…] http://blog.schertz.name/2010/09/updating-the-lync-2010-address-book/ […]
[…] http://blog.schertz.name/2010/09/updating-the-lync-2010-address-book/ […]
Jeff,
Your site has always been my first stop for problems with our Lync 2010 install. So now I come back with another issue I’m hoping you can help.
You skipped over the Update-CsUserDatabase command in this blog. this is the part of the address book piece we are currently having issues with. We have validated LDAP connects, but when we type that command we get a “connection failed” error. Is there a way in Lync 2010 to force it to look at a specific domain controller, since we have them all over the planet? It looked like it could be done in Lync 2013, but that part of the command is not recognized by Lync 2010. This is causing one site to not have the same addresses in their address book as the other site has.
Another thing we noticed is some of the new DCs are using IPv6, which Lync doesn’t seem to like very much.
Thank you for any pointers or info you can send
Mike
Thanks for the port, we are facing issue where some users have outdated AB files and they are not downloading the latest files. So is it possible to update the files for all the clients from server end? I tried manually on one machine using the above steps and it works, so how can this be done for all the users.
Some good info here. FYI, my skype puts the galcontacts.db and idx here:
%userprofile%AppDataLocalMicrosoftOffice16.0Lyncsip_email.address@domain.com
hi great article
I have used the MSRTsip-groupingid field in AD to segregate the address book. I have populated the field with the GUID of the OU the users reside in. The issues I have is that the address book never gets created on the file share. I only see the default address book 0000-0000-0000-0000
Hello Jeff, I have issues with Skype client, Gal contacts.db file is unable to download. OCS 2007 client is able to download .dB files however Sfb client is unable to download the Gal contacts.db file. What could be the issue. I have tried with registry changes in the local pc, still not working,We are having Lync 2010 server .
If your corporate Address Book is to large then the Group Series can fail to completely download and unpack the files. IF this happens it will revert to using the Address Book Web Query service on the Lync Server, assuming that it is enabled. The GS adheres to the in-band client policy for this behavior from the server, controlled by “Set-CsClientPolicy -AddressBookAvailability”
In a pinch if contacts will not sync with lync due to connection error, import outlooks Galcontacts.db and CalContacts.db.idx files into root lync directory. logoff and quit lync, and restart. Walla !