Wednesday, March 3, 2010

People picker : can't see the users from different domains

[What you have]:

 A people picker that doesn't show the users. But you sure you have them.

[What you want]:

 You want to find a user through people picker. Or even may be you want to be able search users from several AD.

 [What you want to know]: 

You have to setup the property for particular site where you are experiencing the problem.

The explanation:
You have to setup valid user from a domain to search through AD for this domain.

[What you want to do]:

stsadm -o setapppassword -password (is not required).
stsadm -o setproperty -pn peoplepicker-searchadforests -pv "domain:DnsName,user,password" -url http://localhost

DnsName - the name of the AD;
user - user name which is going to be used for search through the forest;
password - pwd of the user.

[SharePoint 2010]

I have noticed that after execution of the command the previous settings get erased. That means if you want to set several domain to search in, you need to specify BOTH of them in one parameter:

stsadm -o setproperty -pn peoplepicker-searchadforests -pv "domain:[domain1],[domain1]\[user],[pwd];domain:[domain2],[domain2]\[user],[pwd]" -url [web app url]

Live example:

stsadm -o setproperty -pn peoplepicker-searchadforests -url "https://portal2010.wm.local" -pv " domain:wm.local,wm\user,wmPwd"

where wmPwd is a password for a user wm\user who has access to domain wm.local