People selection filter
I have several client sites and I have a list of people picker problems. I only want to show people who have access to their own company's customer site. I don't want other customers to see other company's customers.
I tried this, but it has no effect:
stsadm -o setproperty โurl http://extranet.company.com/sites/project1 โpn peoplepicker-onlysearchwithinsitecollection โpv yes
source to share
The stsadm peoplepicker-onlysearchwithinsitecollection command will only show people who are members of that site collection, the best way to limit users is to use the stsadm command:
peoplepicker-searchadcustomfilter
So:
stsadm -o setproperty -url http: // contoso -pn peoplepicker-searchadcustomfilter -pv (LDAP QUERY)
This allows you to specify an LDAP query that can be executed to return any AD users or groups based on any criteria you want.
source to share
Unfortunately peoplepicker- searchadcustomfilter applies to the entire web application even if I specify the site collection in the url.
stsadm โo setproperty โpropertyname peoplepicker-searchadcustomfilter -propertyvalue "(|(userPrincipalName=*mycompany.com)(memberof=CN=client_users,OU=client_Users,OU=Extranet,DC=client,DC=int))" -url http://myserver/sites/site1
stsadm -o getproperty -pn peoplepicker-searchadcustomfilter -url http://myserver/sites/site1
stsadm -o getproperty -pn peoplepicker-searchadcustomfilter -url http://myserver/sites/site2
When I ran above, I expected to see site1 with a custom LDAP query, and site2 without a filter. But instead, I see a custom LDAP query across all site collections in this web application. Bummer.
Looks like Microsoft needs clarification on the documentation .
source to share