This post is about a recent interesting observation with people picker. After using Windows authentication for a while we switched to forms authentication with custom membership provider. Now when we used people picker, it was displaying the custom membership provider users, which is expected, and also the domain users! This was confusing. After doing little research on the people picker control found that it uses PeopleEditor class and the places it looks for users is driven by the AccountType property. It is an enumeration with possible values of: "DL, SecGroup, SPGroup, User". There is no explanation on MSDN about what each value stands for but there are few guesses in the community content section; listed below:
DL – Distribution List. AD or the custom membership provider
SecGroup – AD Security Group.
SPGroup – SharePoint Group
User – Single User. Here my guess is, single users are all the users that you see under "All People". These are the users who have accessed a Web at least once.
You can set the AccountType property with a comma separated string of above values. My guess is PeopleEditor.AccountType property is set to "DL, SecGroup, SPGroup, User" to search for all possible users. Once I deleted all the domain users from All People I’m getting just the custom membership provider users. This kind of asserts my guess about AccountType.User.