0

We have recently migrated a SharePoint a Farm from one domain to other domain. All the users are successfully migrated but in SharePoint applications, a single user is being resolved from two domains. We dont want to make any changes or remove users from other domains. We feel its better to make changes at web application level instead to the Farm. What would be the best practice in this case?

How to confine a SharePoint web application to only load users from one Domain?

  • Do you mean that the People Picker search is showing users from more than one domain or do you mean that you have user profiles from more than one domain? – Matthew McDermott Sep 27 '17 at 23:08
  • People picker is showing users from more than one domain – Achiever SP Sep 28 '17 at 11:47
1

You have to adjust your People Picker settings for the web application. It appears that your trust is allowing the discovery of user accounts from both domains. If you have disabled the accounts in the old domain you could use:

stsadm -o setproperty -propertyname "HideInactiveProfiles" -propertyvalue "true"

Then create a SearchADCustomFilter to exclude disabled users and groups. If the users are enabled in both you will need to add an additional clause to exclude the other domain entirely:

(|(objectCategory=group)(&(objectCategory=person)(objectClass=user)(!objectClass=inetOrgPerson)(!userAccountControl:1.2.840.113556.1.4.803:=2)))

You can apply all this with PowerShell:

$webapp = Get-SPWebApplication "https://yourwebapp"
$webapp.PeoplePickerSettings #Displays your current values
$webapp.PeoplePickerSettings.SearchADCustomFilter = "(|(objectCategory=group)(&(objectCategory=person)(objectClass=user)(!objectClass=inetOrgPerson)(!userAccountControl:1.2.840.113556.1.4.803:=2))) " #Sets the SearchADCustomFilter value
$webapp.Update() #commits the change

More backgroud and additional info from Ron Grzywacz People Picker Settings and TechNet Configure People Picker

| improve this answer | |
0

To lookup for new users in OOB People Pickers : stsadm -o setproperty -url "site url" -pn peoplepicker-onlysearchwithinsitecollection -pv no

To lookup for users using Last Name: stsadm -o setproperty -url "site url" -pn peoplepicker-searchadcustomquery -pv (Surname={0})

To lookup for new users in People Editor: stsadm -o setproperty -pn peoplepicker-Peopleeditoronlyresolvewithinsitecollection -pv no -url "site url"

| improve this answer | |

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.