When trying to configure the people picker to search a trusted domain I ran the command “STSADM.exe -o setproperty -pn peoplepicker-searchadforests -url http://servername” using the SharePoint 2010 Management Shell from the Central Administration server in our SharePoint farm. I received the error:
“The Web application at http://servername could not be found. Verfiy that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.”
The error was strange because the web application URL I entered does exist. I removed the URL parameter and ran the command again. This time it ran without error. To check the value I ran the command “STSADM.exe -o getproperty -pn peoplepicker-searchadforests” This returned the value I expected. However, when I tried to search for users from the remote domain nothing was returned.
I then connected to one of the Web Front End servers and ran “STSADM.exe -o getproperty -pn peoplepicker-searchadforests”. Again, it returned the expected value. I then ran the command with the URL parameter “STSADM.exe -o getproperty -pn peoplepicker-searchadforests -URL http://servername” This didn’t return the expected value.
I realized that the initial command “STSADM.exe -o setproperty -pn peoplepicker-searchadforests -url http://servername” needed to be run from the web front end server. This time I didn’t receive the error about the web application not being found.
Unfortunately, this isn’t the end of the story as when I searched for a user I received the error “There was an error in the callback”.
In order to fix this error I had to update the permissions on the registry key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0\Secure” on each Web Front End server. The local groups need the following permssions:
WSS_WPG – Read
WSS_ADMIN_WPF – Full
WSS_RESTRICTED_WPG_V4 – Full
Having changed the permissions I was able to search.