Lync doesn't generate Address Book files and you receive an error 404 when using the Test-CsAddressBookService cmdlet
Some time ago we got a case where a customer said that the users of a single pool couldn’t download Lync Address Book. The error that the users were receiving was: “Cannot synchronize with the corporate address book because the file could not be found.”
When testing with the cmdlet Test-CsAddressBookService, the customer received the following result:
Target Fqdn : pool.contoso.com
Target Uri : https://lyncweb.contoso.com/abs/handlerResult : Failure
Latency : 00:00:00
Error Message : The remote server returned an error: (404) Not Found.
Diagnosis : Content-Length : 5433
Cache-Control : private
Content-Type : text/html; charset=utf-8
Date : Mon, 18 May 2014 10:32:01 GMT
Server : Microsoft-IIS/7.5
X-Powered-By : ASP.NET
Browsing to the LyncShare path to the Address Book files (something like \\lyncshare\1-WebServices-1\ABFiles0000000-0000-0000-0000-0000000000000000000-0000-0000-0000-000000000000 ), we detected that the last delta file (and also the last full file) was generated more than 15 days ago. Therefore, this was the issue: on a standard behavior, Lync generates the Lync Address Book file every day, usually at 2AM, and this file was not being generated.
When we run into this situation, there are two possible ways of solving it:
The first one is more like a workaround, but this is the way Microsoft recommends to customers regarding Address Book, which is to use the WebSearch only, removing the Address Book issues. Previously, Microsoft recommended using the OfflineAdressBook (File Download), but nowadays they recommend the online mode, as the overload that the WebSearch generates on the network by the online consult is very low. To activate it, you have to create a Client Policy or change the global Policy to WebSearchOnly. To know what Policies you have and how this is configured on your environment, you can run the cmdlet below:
To change the global Policy, you just need to run the cmdlet Set-CsClientPolicy -Identity Global -AddressBookAvailability WebSearchOnly, as you can see below:
If you don’t want to apply the Policy to all your users, then you just need to create a Policy to those that you want to use only the WebSearch and apply this policy to these specific group.
By doing this, you won’t have issues regarding ABS download anymore, including the above issue.
However, if you don’t want to deactivate the offline ABS because of your company policies, network issues or if you are worried about availability, you can use the steps below:
- Access Lync ABS share, which is going to be on a path like this: \\lyncshare\1-WebServices-1\ABFiles0000000-0000-0000-0000-0000000000000000000-0000-0000-0000-000000000000. Do the backup of the ABS files, copy them to another folder and delete the files within this folder.
- Check if the flie generation is activated, using the cmdlet Get-CsAddressBookConfiguration:
- If so, deactivate the File Generation, using Set-CsAddressBookConfiguration -EnableFileGeneration $false.
- Now, run the cmdlet Update-CsUserDatabase, wait for 5 minutes and then activate again the ABS files generation by running Set-CsAddressBookConfiguration -EnableFileGeneration $true.
- Lastly, run Update-CsAddressBook and wait for another 5 minutes.
After ending this process, you can verify on the ABS LyncShare that new files are being generated, and when testing with a user, you will be able to download ABS normally.