Wildcard Search for Forms Based Authentication Users in the SharePoint 2010 People Picker Not Working
December 30, 2010 2 Comments
The Problem
Ran into an issue today with a client. We have their site configured for mixed authentication in SharePoint 2010 – using both Windows Authentication for internal users, and Forms Based Authentication (FBA) users, using the default SQL Membership Provider. The problem was that we could wildcard search Active Directory users, but, not FBA users. Interesting. If we typed in their username exactly, it came up just fine. Otherwise, well… nothing.
I had no idea what the issue could have been, so… I did a little digging around, and was able to come up with the solution!
The Resolution
The fix, is quite easy! Thanks to this post I came across: http://mikevallotton.wordpress.com/2010/10/18/sharepoint-2010-claims-authentication-custom-login-form-part-1-modifying-your-config-files/, I had a “duh!” moment. When setting up the FBA provider originally, I seemed to have skipped a step – adding the Membership and Role providers into the PeoplePickerWildcards section of the web.config.
<configuration>
…
<SharePoint>
…
<PeoplePickerWildcards>
<clear />
<add key="SQL-RoleManager" value="%" />
<add key="SQL-MembershipProvider" value="%" />
</PeoplePickerWildcards>
…
</SharePoint>
…
</configuration>
That did the trick, now both my roles and users can be searched via wildcard in the People Picker in SharePoint 2010. Hopefully this helps others out!
Do you know a way to be able to make this work for a SQL membership provided for Roles, I found that you can not search for a role using a SQL membership provider?
Unfortunately not. I do not know offhand where the limitation is for the role search, but it cannot be done, unless a custom provider is written to do so. the ASP.NET membership provider does not support this.