Thursday, December 5, 2013

Unable to search GAL with less than 4 characters via Exchange Server 2010 ActiveSync


You attempt to search the Global Address List (GAL) via a phone that uses Exchange Server 2010 ActiveSync but notice that the search fails when you search with 3 characters or less:

image image image

**Note that the screenshots above are from a Blackberry z10 device’s Look up… feature.

Searching with 4 characters or more works as expected:

image image image

Reviewing the IIS Logs on the CAS server in the directory:



Reveals the following:

2013-12-05 14:11:43 POST /Microsoft-Server-ActiveSync/default.eas Cmd=Search&DeviceType=BlackBerry& 443\KAB RIM-Z10-STL100-1/ 200 0 0 265


The text that identifies the search string too short in the log is:



A bit of research on the internet revealed that in Exchange Server 2010, the default minimum amount of characters required to search the GAL via ActiveSync is 4 characters instead of 2 which is the default setting for Exchange 2003 (the Exchange 2007 organization I had to troubleshoot also exhibited the same behavior). As a result of this change, attempting to search with 3 or less characters on a BES 10 device which uses a BES 10 server that uses ActiveSync to retrieve information from Exchange Server 2010 would fail.  To correct this issue, edit the web.config file on all of the CAS servers at the following directory:

C:\Program Files\Microsoft\Exchange Server\V14\ClientAccess\Sync


Backup the web.config file prior to making the change:


Locate the <appSettings> section:


Add the following text with the appropriate value desired (we’ll use 2 for this example to allow searching with 2 characters) between the <appSettings> and </appSettings> tag as such:

<!-- Sets the minimum number of characters required for searching -->

<add key="MinGALSearchLength" value="2"></add>


Perform a iisreset command on the CAS server once the changes have been made:


Searches with 2 characters should now work:

image image image

Hope this helps anyone who may come across this issue.

1 comment:

Anonymous said...

Perfect, thanks for posting this. Happening to me after doing an upgrade to Exchange 2010 SP3 so the web.config file must have been overwritten.