SharePoint Internals – Hristo Pavlov’s Blog

1 July, 2008

Getting your ‘People Picker’ to pick AD groups

Filed under: SharePoint — Tags: , , , — hristopavlov @ 3:06 am

The Microsoft.SharePoint.WebControls.PeopleEditor control can be easily used in your web parts or other web based SharePoint solutions to provide a “People Picker” functionality. To find out how to use it see for example Ishai’s post here:

However one of the things I needed to do was to use the control not just pick people but also to pick AD domain groups. This functionality is provided by the control but is not enabled by default when you create a new PeopleEditor class instance. In order to enable it you need to set the SelectionSet string property of the control to a comma separated list of the entities you want your people picker control to pick. Possible values are User for AD User, SecGroup for AD Group, DL for AD distribution list and SPGroup for a SharePoint group.

So if you want your people picker control to pick both AD users and AD groups you will need to set SelectionSet to “User,SecGroup” .




  1. […] Getting you ‘People Picker’ to pick AD groups […]

    Pingback by Links (7/1/2008) « Steve Pietrek - Everything SharePoint — 2 July, 2008 @ 1:13 am

  2. hi, i would like to ask something about this people editor thing..

    i used it in my webpart and seems doing fine. users can be seen from the people editor box. i have one method wherein I am getting the employee number based on the loginName of the user i selected from the people editor, the thing is, when i select the user from the peopleeditor, the user is there, but when the GetEmpNbr method is read, it throws an error “User cannot be found.”

    do you know what might be causing the error?

    also, isn’t it that when you specify “User” in the SelectionSet, it would get all AD Users, but why this time, I could select it from peopleeditor, but the AD could not find the user..

    any thoughts on this?

    Comment by jeiku — 21 August, 2008 @ 8:26 am

  3. Hi Jeiku,

    I assume that GetEmpNbr() is your custom method that connects to the AD to get some extra info about the user. There are various reasons why it may be failing. For example you haven’t specified the correct domain name or organization unit, you haven’t connected to the right AD server.

    I think that it is better if you ask this question in an AD specific group or try to search more about LDAP queries. I’m assuming you are using LDAP.

    Comment by hristopavlov — 21 August, 2008 @ 10:12 am

  4. Hi Ishai,
    I am greatly impressed by your posts. I have this problem of people picker. this is the prob in brief:

    we initially had single server deployment with 8 web app on WSS 3.0.
    due to load, we now moved them to a new farm with 3 servers with following configuration:
    1. all having wss 3.0 SP1
    2. all patched with search server express 2008
    3. search and query bieng served by server3

    also not worthy here is that due to budget constraint and stuff, we dint had load balancing so we are doing context switchin with
    4 app on server1 and 4 app on server2..
    each of this app is turned off in IIS in other server and each app has own IP and DNS.
    so the NIC of each server has 4 IPs

    backup restore happened like a charm. the expected context swithcing happens like a charm. but now people picker goes in infinite “query bieng processed” and never fetches anything

    this problem has become a red flag as this the 4th day and i could find nothing that worked.

    Comment by Adil — 24 March, 2009 @ 1:08 pm

RSS feed for comments on this post. TrackBack URI

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

Create a free website or blog at

%d bloggers like this: