Tuesday, December 28, 2010

SharePoint People Picker Limit Selection

By default, the people picker will let a user select anyone visible to the picker. This is not always an ideal situation. Luckily, there are a couple of ways to easily limit what the user can select from.

First, if you need to limit selection to site collection users, you can use an stsadm command

stsadm -o setproperty –url http://sitecollectionURL
       –pn peoplepicker-onlysearchwithinsitecollection –pv yes

There are a couple of other options to limit selection that involve setup in active directory. They can be found here; Keep it Simple!
Peoplepicker: Stsadm properties

Second, customize the people editor control with the SharePointGroup property. I've found this solution very helpful in customizing input screens as it gives really fine grained control over an individual field. The field below will only allow selection from "SomeGroup".

<SharePoint:PeopleEditor ID="plpEdit" runat="server" SharePointGroup="SomeGroup" />

No comments:

Post a Comment