My organization has 2 domains. DomainA and DomainB are 2 separate forests with mutual trust.

When I use the SharePoint people picker the auto-complete displays user profiles from both domains.

I’m trying to restrict the SharePoint people picker to look in to a single domain, DomainB.

I tried using this script outline in this MS article, however the people picker still displays both profiles. "Restrict People Picker to a certain group in Active Directory"

stsadm -o setsiteuseraccountdirectorypath -path "OU=Sales,DC=DomainB,DC=local" -url http://sitecollection

Configure People Picker in SharePoint 2013


2 Answers 2


Try to limit with property peoplepicker-searchadforests with the following command:

stsadm -o setproperty -pv peoplepicker-searchadforests -pv "domain:domainb.local" -url http://sitecollection

If this doesn't work, you need to create an account in DomainB and modify the command:

stsadm -o setproperty -pv peoplepicker-searchadforests -pv "domain:domainb.local,domainb\user,password" -url http://sitecollection


I am not sure that this is relevant in your case, but be aware that the client-side people picker will remember and show you previously picked up user accounts from your browser's local storage. The presentation is a little bit different from user accounts resolved from a query to the directory but it can easily fool you.

To make the tests easier, first clear the people picker's cache entry from the browser's local storage and never click on the user accounts you get as results in order to keep the cache empty.

I would have put this in a comment if I had enough reputation, hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.