We are using SharePoint 2016 and have two web applications (WebAPP1 and WebAPP2) on the farm. Currently both the web apps people picker works fine. Domain for both the web apps is DomainA. we are trying to give access to single account which is a windows account ending with DomainB. This DomainB account is showing up fine on Web APP1, while trying to find on WebAPP2 it shows "there is no match". I checked the $webapp.peoplepickersettings on both web apps and looks similar. DO I need to do any changes or configurations to make this account available on peoplepicker of webAPP2.

Please suggest on this .

1 Answer 1


Use following powershell to add Domain B in the specific web application people picker settinggs to check the result:

Add-PSSnapin microsoft.sharepoint.powershell
$webApp = Get-SPWebApplication http://server:port

# Save current PP settings to the text file in case you need to refer to those
$webapp.PeoplePickerSettings.SearchActiveDirectoryDomains | Out-GridView

$newdomain = new-object Microsoft.SharePoint.Administration.SPPeoplePickerSearchActiveDirectoryDomain
$newdomain.DomainName ='yourDomain.com';  # specify the DNS name
$newdomain.ShortDomainName ='yourDomain'; # Specify the netbios name.
$newdomain.LoginName ='yourDomain\sp_farm'
  • Hi Julie, what should I give for the login name? is that the second domain I am going to add?
    – SPLearner
    Mar 4, 2021 at 19:57
  • Yse, specify an account in second domain.
    – Julie_MSFT
    Mar 5, 2021 at 7:31
  • Hi Julie I am just adding one user of different domain, so Shall I give that user name and password to add using this script?
    – SPLearner
    Mar 5, 2021 at 12:48
  • This code is aim to add all users in domain B to specific web application, there is no need to add the user one by one.
    – Julie_MSFT
    Mar 8, 2021 at 2:24
  • Is there any other way we can add a single user without script to access the site Julie?
    – SPLearner
    Mar 10, 2021 at 16:28

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.