22 July 2010

Setting People Picker to search users within the forest

So you setting up your SharePoint farm to import all the users into SharePoint User Profile database. You create a new profile connection and run the full import:

image

Once you do this you are able to see all the imported users in the user profiles in your SSP:

image

Eevery thing looks perfect and you create a web application and set this SSP as the primary provider. All the imported users should be able to access your site is you have given at “Read Only” permission to “NT Authority\authenticated users”. This all works, except you cannot lookup or search users with people picker control. By default people picker is only allowed to search people in site collection. SharePoint creates users in a site collection when they try to login into the site first time. Even if they fail to login that username is created in the site collection and it will appear in the people picker “Select people and groups” dialog box.

If you find this behavior unacceptable (as I do) and want to search people in your Active Directory forest, you will have to use the following stsadm command:

stsadm.exe -o setproperty –url “http://myportal.com” -pn "peoplepicker-searchadforests" –pv “forest:mydomain.com”,"domain:mydomain.com", domain\username, password

you will need an account that can access the domain controller and make the query. Once this is setup your people picker should able to search “mydomain.com”forest inside the “myportal”.

0 comments: