3

We have a farm that's setup on Domain A and it has trust to Domain B. By default we can find the users for Domain A in the People Picker, but we would like to add the users for Domain B as well in the People Picker.

I have followed these articles to try and make this happen, without success: https://technet.microsoft.com/en-us/library/gg602075(v=office.15).aspx http://www.sharepointdoug.com/2014/06/how-to-configure-people-picker-in.html

I have tried these PowerShell commands:

stsadm -o setproperty -pn peoplepicker-searchadforests -pv "forest:DomainA.com; domain:DomainA.com,DomainA\UserA,Pass123;domain:DomainB.com,DomainB\UserB,Pass123" -url "http://TheSite"

stsadm -o setproperty -pn peoplepicker-searchadforests -pv "domain:DomainA.com,DomainA\UserA,Pass123;domain:DomainB.com,DomainB\UserB,Pass123" -url "http://TheSite"

When I run these commands I'm only able to see the users from Domain B in the people picker, but I would like to see both users from Domain A and Domain B.

When I run the following PowerShell command everything goes back to default and I can see users from Domain A only:

stsadm -o setproperty -pn peoplepicker-searchadforests -pv "" -url "http://TheSite"

I have spent quite a lot of time on this and I'm clearly missing something. All help will be greatly appreciated.

Thank you.

3

Try below command. This command worked for us:

stsadm -o setproperty -pn peoplepicker-searchadforests -pv "forest:DomainA.com;forest:DomainB.com,DomainB\login,password" -url "Your webapp url"
6

One alternative to using stsadm.exe, as it is a deprecated tool, would instead to use PowerShell. You will also have a bit more control as there are other parameters in PowerShell that cannot be set through stsadm.

$wa = Get-SPWebApplication http://webAppUrl
$adsearchobj = New-Object Microsoft.SharePoint.Administration.SPPeoplePickerSearchActiveDirectoryDomain
$adsearchobj.DomainName = "contoso.com"
$adsearchobj.ShortDomainName = "CONTOSO" #Optional
$adsearchobj.IsForest = $true #$true for Forest, $false for Domain

$wa.PeoplePickerSettings.SearchActiveDirectoryDomains.Add($adsearchobj)
$wa.Update()

More details from PowerShell for People Picker, including other examples.

  • Hi Trevor , I tried script you posted but its not working. we have one way trust between domain where SharePoint servers are and users domain. Do in need account ? – Ronak Jan 27 '18 at 1:48
  • Yes you must provide an account. – Trevor Seward Jan 27 '18 at 1:49
  • Thanks for quick response. Does this account has to be in domain ? if yes then which one ? Do it need any kind of permission ? – Ronak Jan 27 '18 at 2:12
  • @TrevorSeward Will this PS command work when the farm is built in Domain A (WFE/APP/DB Servers, Service Accounts, Etc.) and has a one-way Trust to Domain B or will this cause issues when users in Domain B try to access the farm? This would be very useful instead of migrating the farm to Domain B as I have seen recommended in other info? I can post as new question if you like just let me know – Shane Gib. Apr 18 '18 at 14:58
  • @Ronak the account needs to be in the untrusting forest (so if DOMB contains SharePoint and trusts DOMA, but DOMA doesn't trust DOMB, the account must be in DOMA). – Trevor Seward Apr 18 '18 at 15:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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