SharePoint 2013 ClientPeoplePicker

Okay we and I have been stumbling around with this neat new control named ClientPeoplePicker in SharePoint 2013. One on the interests in this control is to use it in own web parts. Now if you just simply add the control to web part (or aspx page), you’ll get it working like charm.

However default approach limits the ClientPeoplePicker to return only users from SharePoint, the ClientPeoplePicker does not return SPGroups or Active Directory Groups or Security Groups nor Distribution Groups. As for the default use in SharePoint built in forms/web parts do allow SPGroup to be returned to screen so it is more of the configuration side.

Fortunately after some digging I were able to find out more to this. At the PeopleEditor, default limitations for the results are defined with “SelectionSet” which accepts string containing what is desired (btw. in SharePoint 2013 this will also be set on “User” only, can’t remember correctly was this on default at SharePoint 2010). Now at the ClientPeoplePicker this property is named PrincipalAccountType. By default the PrincipalAccountType is set to “user”. Changing this value for example “User,SPGroup” will allow ClientPeoplePicker to return users and groups. Also there is possible to use “User,SPGroup,SecGroup,DL” selection which will return almost everything you can possibly want from Active Directory.

Currently MSDN documentation does not say anything extra on this property, but that is sure to change at some point. Enjoy if you happen to be stumbling in this topic.

Advertisements

About Sakarih

I am SharePoint developer/architect from Finland and my blogposts are all about SharePoint 2007/2010/2013 stuff. There might be also something else posted.
This entry was posted in SharePoint 2013 and tagged . Bookmark the permalink.

One Response to SharePoint 2013 ClientPeoplePicker

  1. Haithem says:

    It works like a charm…Thank you

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