Wednesday, September 7, 2011

peoplepicker property in sharepoint

here i am adding few info about peoplepicker property which is useful to work with users from other domains. i have used it before and it worked successfully. but didn't try to add in blog .
--------------
stsadm -o setproperty -pn peoplepicker-searchadcustomquery
stsadm -o setproperty -pn peoplepicker-searchadcustomquery -pv "(canonicalName=[YOURDOMAIN]*)" -url http://[yoursharepointsitecollection]
e.g stsadm -o setproperty -pn peoplepicker-searchadcustomquery -pv "(canonicalName=DEV*)" -url http://vmsd-sharepoint
If you want to switch this off then run the same command but change the -pv parameter to ""
e.g stsadm -o setproperty -pn peoplepicker-searchadcustomquery -pv "" -url http://vmsd-sharepoint
---------------
Here's a list of the people picker properties that can be set ()
peoplepicker-activedirectorysearchtimeout
peoplepicker-distributionlistsearchdomains
peoplepicker-nowindowsaccountsfornonwindowsauthenticationmode
peoplepicker-onlysearchwithinsitecollection
peoplepicker-searchadcustomquery
peoplepicker-searchadforests
---------
peoplepicker-searchadforests
If it is not a two way trust then you will need to specify an account and password, which are encrypted and stored in the config database.  The "peoplepicker-searchadforests" stsadm property allows you to search multiple values when picking users.  With the command you can add multiple forests, domains, and accounts and even specific property searching.
stsadm.exe -o setproperty -url http://server:port -pn "peoplepicker-searchadforests" -pv "forest:foo.corp.com;domain:bar.foo.corp.com", LoginName, Password
To use peoplepicker-searchadforests with credentials, which you need to specify if you don’t have two-way trusts in place, you must first set an encryption key:
stsadm.exe -o setapppassword -password key
----------
peoplepicker-searchadcustomquery
Allows the administrator to set the custom query that is sent to Active Directory.
For example, we could set it to
stsadm.exe -o setproperty -pn peoplepicker-searchadcustomquery -pv "(physicalDeliveryOfficeName={0})"
------------
peoplepicker-onlysearchwithinsitecollection
This will restrict the picker to only people and groups that are in the site collection.

No comments:

Post a Comment