One of the new features in Lync Server is the ability to use the Address Book Web Query (ABWQ) component in place of the default Address Book Service (ABS) for the standard Lync client.

By default only the Lync Phone Edition, Web App, and Mobile clients will leverage real-time web-query based searches against the Lync Server’s rtcab (or rtcab1) database which stores the same address book information that the ABS server files do.  In previous versions of Communications Server those databases existed only to service queries from clients which were incapable of downloading and storing local contact cache files.  Yet the standard Communicator client could only leverage the ABS download method and would not use the web query method for basic searching.

Now in Lync Server client policy settings can be used to modify that behavior of the standard Lync 2010 client software.  (The phone, mobile, and web app editions are still limited to using ABWQ only).

This TechNet article describes each client edition’s default behavior as well as introduces the Client Version policy setting used to control that behavior.  In order to use ABWQ only for all editions the client policy parameter AddressBookAvailability must be changed on either the default global policy or modified on a new policy which is then assigned to the desired users.

There are currently three available settings for this parameter which are self-explanatory based on the names: WebSearchAndFileDownload, WebSearchOnly, and FileDownloadOnly.

This article details the multiple steps to create a new policy, define that policy, and then assign it to a test user to validate the altered behavior.  If desired, this parameter can simply be changed on the Global policy to impact all users in the organization.

Validate Default Setting

Start by checking that the Lync Server environment is still set to the default behavior by identifying how many client policies are defined and then querying them for the address book policy.

  • From the Lync Server Management Shell enter the following Get-CsClientPolicy cmdlet to list all defined client policies by name as well as list the current address book setting.

Get-CsClientPolicy | Select-Object Identity,AddressBookAvailability | ft

image

Only the default Global client policy was returned, indicating no other custom policies yet exist in this Lync deployment.  The default value of WebSearchAndFileDownload was also confirmed as the current AddressBookAvailability setting.

Force ABWQ

As previously mentioned the modified behavior will only be set for a single Lync user as a preliminary test by defining a new client policy and than granting that policy to the user.

  • To create a new client policy using the default settings, yet modifying the client address book behavior, enter the following command in the Lync Server Management Shell using any desired string for the Identity value to set of the name of the new policy (e.g. ChicagoClientPolicy).
  • Set the AddressBookAvailability parameter to WebSearchOnly.

New-CsClientPolicy -Identity ChicagoClientPolicy -AddressBookAvailability WebSearchOnly

  • To assign the new policy to a single Lync user enter the following Grant-CsClientPolicy cmdlet.

Grant-CsClientPolicy -Identity jeff -PolicyName ChicagoClientPolicy

  • (Optional) Verify the new policy and settings by using the following cmdlet to list all parameters of the new client policy.  Verify that the AddressBookAvailability parameter is set to WebSearchOnly.

Get-CsClientPolicy -Identity ChicagoClientPolicy

AddressBookAvailability                : WebSearchOnly

  • (Optional) Alternatively the following cmdlet can be used to list only the non-null parameter values, which makes for an easier to read list of the current settings.

C:> (Get-CsClientPolicy -Identity ChicagoClientPolicy).psobject.properties |? {$_.value}| select name,value

Test Lync Client

Logon to a workstation using the account which was just updated to use the new client policy.  To visually verify that the ABWQ service will be used first delete the cached address book file (if this user has already signed-in to Lync once previously) on this workstation.

  • On Windows Vista/7 workstations open the %userprofile%appdata
  • On windows XP workstations open the
  • Open the sip_username@domain.com folder for the user account which has been assigned the new client profile. (If it does not exist then skip the next step.)
  • Delete the GALcontacts.db and GALcontacts.db.idx files.
  • Leave the folder open and then sign in to the Lync client with that same user account.  Use the search bar as shown below to look for users not currently in stored in the contact list.  In the example shown the string ‘k’ was simply entered and results were listed below.  The folder view shows that no GALcontacts.db file was downloaded by the client, deducing that the Address Book Web Query method must have been used to return those results.

image

To further validate that assumption compare the IIS W3SVC logs on the Lync Server between a client still using the global client policy (which is using the ABS) and the newly configure client (which is using ABWQ).

  • 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.)

GET /abs/handler/F-0e21.lsabs – 443 sip:Kristina@mslync.net 192.168.103.104 OC/4.0.7577.0+(Microsoft+Lync+2010) 200 0 0 47

  • Yet the same logs shows no requests from jeff@mslync.net to download any .lsabs files. This also indicates that ABWQ is used by this client.

Additionally any search attempts on the ABS-enabled Lync client do not trigger any new POST or GET entries in the logs, while search entries from the ABWQ-enabled client do show a record of a WebTicket request against the Group Expansion service.  Each time a new search query was typed into the client another one of these POST lines would appear.

 

2010-11-27 15:43:40 192.168.103.23 POST /groupexpansion/service.svc/WebTicket_Bearer – 443 – 192.168.103.104 OC/4.0.7577.0+(Microsoft+Lync+2010) 200 0 0 47

Why Do This?

Now that we have seen how this is performed the question must be asked if and when it would be recommended to do this.  The entire point of the ABS method is to allow for local cache files to be used in an effort to reduce requests from clients to the Lync Server for a number of actions.  If comparing logs side-by-side it will be clear that the user photos are downloaded via the ABWQ regardless of the client behavior as these images are not stored in the GALcontacts.db.

One advantage to forcing ABWQ on all clients could be in an environment where changes to user attributes happen very often (multiple times per day).  The source address book files pulled from Lync clients are only updated every 24 hours by default, but those same changes in AD are pulled into the rtcab database roughly every 5 minutes by default.  Thus leveraging real-time lookups against the up-to-date database instead of cache-file based lookups could be more beneficial in some cases.

As with many new features that are added to later releases of software sometimes they can come from just a few large enterprises asking for a specific feature during trial use periods of pre-release code.  Meaning that just because the setting is there doesn’t mean you should rush out and turn it on.  In most cases the default setting is a default for a reason, yet if you understand what you are doing then having the ability to modify that behavior natively, and doing so in a supported fashion, is always a great advantage.

By Jeff Schertz

Site Administrator

26 thoughts on “Forcing Lync Address Book Web Query”
  1. I have a question about Lync if you don’t mind.
    We’re very new to using it and I’m the only one that administers the program. I’m fairly new to IT admin in a sense that I was a desktop support for a number of years before I got thrown into this position. So please forgive me if this is dumb question.
    Lync is setup with all the defaults and the users are complaining that when they look up a contact, it’s pulling the results from the GAL and their personal address books. Is there way to make it pull from the GAL and a specific address book? If the users make an address book called Lync Contacts in their Outlook client, can Lync search just GAL and Lync Contacts?

    1. Richard, Lync by default searches both the Lync Address Book and user's personal Outlook Contacts. I do not believe there is anyway to limit the scope of what can be searched within the personal Contacts. You could disable Outlook as the Personal Information Manager in the Lync client but that will disable all Outlook integration in terms of presence updates from calendar items and Exchange integrated conversation and missed call history.

      1. Jeff/Richard, I know your replies were months ago, but I felt I should update this. I believe in a Lync Server update at some point they included the ability to exclude your Outlook Contacts from being search.

        On your Lync Front-End, simply do:

        Set-CsClientPolicy -Identy Global -ExcludedContactFolders "Contact;Contacts;Suggested Contacts,IPM.Contact"

        This assumes you are using the Global default client policy and haven't made a new custom one. Also it excludes contact folders by name, so you can add others if necessary.

  2. Hello Jeff, thank you for the info, it "smells" like the thing I'm looking for somehow ;-). I would like to provide MY OWN address lookup/directory service, on the server. I mean: when a call comes in, the mapping to user-name should go though my own logic. And viceversa, when I start to type in some characters into my Lync client, I would like the client call my own logic (I guess the web service, behind the front end server), so I can mix-up my own mixture of names, may be prioritized, may be filtered or whatever. E.g. I'm looking for a way to completely control the searching (chars typed into the client) and mapping (SIP mapped to contact fields) logic. As I'm reading your article, it looks like one could replace the ABWQ. What do you think? Thank you, Andy

    1. I think you have quite the coding project in front of you 🙂 It sounds feasible but I doubt anyone has attempted to do this yet. Good luck!

      1. Hello. Did anyone ever do this? I am very interested in doing the same. Coding project scope aside, for I don't question it, how would one approach this, overview-wise? URL rewrite rules? MSPL? Lync mid-tier application? Something else? I would appreciate any guidance whatsoever. Thanks.

  3. Hi Jeff,
    Good post. i think We'll stick with using address book files for now.However one place i'd like the ABWQ to work is during the initial ABS download.

    During initial login and right after migration, users complain of not seeing their address book for about an hour. Would have been great if the ABWQ worked until file download was completed.
    I was hoping the default config of WebSearchAndFileDownload would help here, but appears ABWQ doesnt work with normal clients in this case.
    I don't want to initiate an instantaneous download though, as i see value in staggering it over an hour for all users. Else network woul limp at 9 am mondat morning.
    Any other options,,,,

    1. I agree, I'm not sure what the WebSearchAndFileDownload is for if it never seems to go to a WebSearch. We're having to set the initial address book download down to 0 so the Lync Client has access to the address book immediately rather than waiting the 1-60 minutes for the GAL cache files to build.

  4. Hi,

    Sorry I know this is an old post but thought I would give it a shot. I have a client with phone numbers in the AD field of pager. when in WebsearchandfileDownload client policy setting I can see this field but when i put it in the websearchonly setting i can no longer see the extension number.
    why would this be?

  5. Hi,

    I know this is a long forgotten topic, but I think the answer for excluding some Outlook contact folders from the seach list is possible via the CsClientPolicy “ExcludedContactFolders” attribute.

  6. Jeff,
    I found a conflict in information about this setting, and I'm hoping you can help straighten this out. This article (http://technet.microsoft.com/en-us/magazine/hh824722.aspx) in figure 1 states that OCS and OCS R2 clients will disable the search if ABWQ only is enabled. However, this article (http://technet.microsoft.com/en-us/library/gg429714.aspx) states it will utilize it. We are migrating to Lync from OCS R2, and have found that even setting ABWQ only with Set-CsClientPolicy doesn't stop the address book from being downloaded to the R2 client (no GPOs forcing the issue, we checked) and it appears to not have any search capability until the addy book has been downloaded.

    Thanks!!
    Mike

    1. The in-band client policies in Lync Server are only applicable to the Lync client, the OCS clients do not adhere to those settings. I'd have to assume that one of those articles it incorrect.

  7. Hi Jeff,

    Question for you i have setup for all client websearch only but after that i cant search new users from other accounts. am i missing anything?

    1. Try running Update-CsAddresBook in the Lync Server Management Shell if you don't want to wait 24 hours for new user data to appear.

  8. Have you seen, the following problem:

    When user type the phone number 0123654, the Lync will normalize the number to "+3589123654" but no user can be found. Normalization rule says: "Match: ^0(9d{2}d+)$ Translate +358$1"

    When user type the phone number in E164: +358123654, the Lync finds the user.

    When using the GAL search, both formats find correct contact.

  9. Hi Jeff,

    We are in process of rolling out Lync Client for thousands of users. Now they have Communicator R2 giving address book sync error.This is because users Machines fail for CRL check. All users are on Lync. 100 odd users have Lync client and they are able to download address book.

    The galcontacts.db file is – 24 MB at this point. Once we roll out for all users might result in bandwidth issue for address book download.

    We intend to use web query for batches we have created and assign the policy and once all is complete we can disable websearchonly policy and use the default one. (websearch&filedownload).

    What are the consequences and is this the right approach.

    Your help in this is much appreciated.

  10. Hi,

    Isn't this a security risk of having the entire GAL being downloaded to a machine outside of your network if we allow external access via the Edge server ? The galcontacts.db can easily be opened in notepad and read. How can we prevent external users from downloading it and only use web search ? Is there a particular https string maybe we can block at our firewall if the Lync client tries to download the address book and that would force it use web search instead ?

    1. That could very well be a concern if the cached files are stored on unmanaged computers. If that is the case then it may be desired to disable the file download method in the policy and allow only the web query method.

  11. Thanks Jeff for your reply. We do want to keep the file download method for internal users. The client policy would apply to both internal and external users if I'm not mistaken. So, I'm thinking to keep both the file download and web query option and block the IIS GET to the .lsabs files from the outside. Hopefully that will force the external clients to resort to just a web query and allow the internal clients to still download the address book.

  12. Hi Jeff

    Great article, i have enabled this in our adb 2015 enviornment. But lately the env is suffering performance issues in KHI. The average disk read sec parameter is in suboptimal. We have around 2900 users total. Do u feel that the web query can cause bottleneck. Earlier it was working fine but lately it’s causing all users to sign out whenever there is a conference skype call of 40 people..earlier 140 users used to be conference and it worked fine. The KHIs were all normal earlier. If you or someone can answer my query urgently.would be great. Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *