How to exclude specific AD OU from SharePoint 2013 people picker?
Is there a way to exclude specific AD OU from SharePoint 2013 people picker?. The reason for this is to exclude Shared Mailbox accounts not to resolve in SharePoint people picker, so that can not add these to SP sites.
MadhuPosted Jul 16, 2020, 1:59 AM
Habibur RahamanPosted Jul 11, 2020, 9:02 AM
MadhuPosted Jul 8, 2020, 3:57 AM
Sharath Kumar AluriPosted Jul 7, 2020, 1:15 PM
Try with the below sample query. If your OU is Shared Mailbox and you want to avoid the specific one try with the below query.
$wa.PeoplePickerSettings.ActiveDirectoryCustomQuery = "(|(mail=*)(objectcategory=group)(!(distinguishedName:=%Shared Mailbox%))"