As a follow up query to the previous notes on working with the PeoplePicker and ADAM, I’ve been asked about the behaviour of the PeoplePicker – specifically, that it appears to only return external users if their username is specifically searched for, not if part of their name is entered. Is there a way to get exactly the same results for users from AD and ADAM? Unfortunately, there are pretty severe limits to this, and unfortunately, I don’t believe you can actually get the same results, though I’d love to be proven wrong.
By default, when dealing with custom authentication sources, including ADAM, the PeoplePicker only returns exact matches. If I search for the username, it will find it. If its a user already on the site collection, it can use the local user details. However, to find non exact matches in a custom repository, you need to edit the WebConfig file, by adding the following section:
<PeoplePickerWildcards>
<clear />
<add key=”ADAMMembership” value=”*” />
</PeoplePickerWildcards>
Unfortunately, this solution isn’t perfect. It effectively adds the wildcard symbol * to every search in the people picker. Lets illustrate this step by step, using a Pat Smith as an example name.
If I search for “Pat”, before updating the web.config file, they’ll only appear with the full name in the results if they’ve already been added to the site somewhere, or if they’re actually in the Active Directory repository.
If I search for “Pat” after updating the web.config file, all the Pats from the ADAM repository and from AD will appear. Problem solved? No.
If I search for Smith, as a surname, I’ll get all the Smiths from AD, but not from ADAM. Thats because the search going to ADAM is actually like “Smith*”. It’ll find everything starting with Smith, not all names containing Smith, and I haven’t come across any variations that will actually resolve this search issue. However, you’ll probably find that this is a significant step forward in any event.
As always with SharePoint, make sure you edit all of the relevant web.config files. You may find SharePoint is happier if you run
iisreset -noforce
after making the change, although in theory you shouldn’t need to - as a rule of thumb, major changes to web applications within SharePoint can have odd consequences otherwise.


Recent Comments