Users from another domain cannot access SharePoint site

Frank Martin 501 Reputation points
2020-08-17T10:38:55.493+00:00

I have a SharePoint 2016 farm installed on DomainA. Users from DomainB are trying to access the site but getting "Sorry, this site hasn't been shared with you" message as expected.

When I open people picker then I don't see users from DomainB. I can't even share a folder on this server to users in DomainB. When I right click on folder and go to "sharing" screen then I can see the domain DomainB.com is there along with DomainA.com but when I type user's name from DomainB then it is not found.

Two level domain trust between these domains has been created by Infrastructure team or so they say (these two are actually forests). I even ran the following PowerShell but same issue i.e. can't see users from other domain in people picker.

stsadm -o setproperty -pn peoplepicker-searchadforests -pv "forest:DomainA.com;domain:DomainA.com;domain:DomainB.com" -url "https://myportal"

I have also seen some articles mentioned following command but I don't know what is the login/password in this command? Is this domain admin account from DomainB or some other account?

stsadm -o setproperty -pn peoplepicker-searchadforests -pv "forest:DomainA.com;forest:DomainB.com,DomainB\login,password" -url "https://myportal"

Microsoft 365 and Office SharePoint Server For business
{count} votes

2 answers

Sort by: Most helpful
  1. trevorseward 11,711 Reputation points
    2020-08-17T17:16:12.43+00:00

    You do not need to use a username/password in a two-way trust scenario when configuring the People Picker for each Web Application.

    I prefer to use PowerShell to set this up as it is easier to read.

    https://thesharepointfarm.com/2014/01/powershell-for-people-picker-properties/

    If you set this up properly, verify that each SharePoint Server can access all DCs in forest B and it still doesn't work, you can set your ULS to Verbose logging (Set-SPLogLevel -TraceSeverity Verbose), attempt to use the People Picker to resolve a name, then see what the failure is in ULS.

    0 comments No comments

  2. Echo Du_MSFT 17,316 Reputation points
    2020-08-18T10:21:02.277+00:00

    As Trevor said, because the domain/forest is trusted in your environment, there is no need to pass the login name or password.
    You can directly use the format: “forest:DnsName” or “ domain:DnsName”.

    For example:

    stsadm -o setproperty   
    -pn peoplepicker-searchadforests   
    -pv "forest:DomainA.com;domain:DomainB.com"   
    -url "http://sp"   
    

    You could refer to the article Peoplepicker-searchadforests: Stsadm property (Office SharePoint Server) that could provide more detailed information.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.