Alexander Anikin's blog

My personal blog

Using peoplepicker-searchadcustomfilter to Limit the People Picker

leave a comment »

I need to  limit the SharePoint 2010 People Picker to only pull users from a single OU in Active Directory. This OU contains all users and groups for one single company.

This needs of our multi-tenancy platform –  there are many different companies working in big SharePoint farm.

My working filter is like this:
stsadm -o setproperty -url http://site -pn peoplepicker-searchadcustomfilter -pv “”(|(&(objectClass=user)(cn=*.company))(&(objectClass=group)(|((cn=*.company)(cn=*.company.Department)))))””

Big thanks to Matthew McDermott, MVP and his post , but this way is not useful for me.

Notes: when I’m testing it – I got some users and groups that souldn’t be filtered. I think they was cached before.

PS: Useful utility for creating filters like this is LDIFDE. Usage:
ldifde -f usersindomain.txt -r “(&(objectCategory=Person)(objectClass=User))“
Good article about: http://mindsharpblogs.com/wayne/archive/2005/06/15/497.html

Advertisements

Written by Alex Anikin

December 3, 2010 at 3:19 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: