People Picker


Code Example

// JavaScript
var $REST = require("gd-sprest");
// Search for users
    MaximumEntitySuggestions: 10,
    PrincipalSource: 15,
    PrincipalType: 15,
    QueryString: "gunjan"
}).execute(function(results) {
    // Code goes here

// TypeScript
import { PeoplePicker } from "gd-sprest";
    MaximumEntitySuggestions: 10,
    PrincipalSource: 15,
    PrincipalType: 15,
    QueryString: "gunjan"
}).execute(results => {
    // Code goes here


Method Description
clientPeoplePickerResolveUser(query: IPeoplePickerQuery) Resolves a user.
clientPeoplePickerSearchUser(query: IPeoplePickerQuery) Searches for user(s) and group(s).


People Picker Query

Name Type Description
AllowEmailAddresses boolean True to allow the email address.
AllowMultipleEntities boolean True to allow multiple entities.
AllUrlZones boolean True to allow all url zones.
EnabledClaimProviders boolean True to enable claim providers.
ForceClaims boolean True to force claims.
MaximumEntitySuggestions number Maximum entity suggestions.
PrincipalSource number The principal source.
PrincipalType number The principal type.
QueryString string The query string. This value must be >= 3 characters.
Required boolean Required flag.
SharePointGroupID number The SharePoint group id.
UrlZone number The url zone.
UrlZoneSpecified boolean Url zone specified flag.
Web any The web.
WebApplicationID any The web application id.
Principal Source
Name Value Description
All 15 Search all principal sources.
MembershipProvider 4 Search the current membership provider.
None 0 Search no principal sources.
RoleProvider 8 Search the current role provider.
UserInfoList 1 Search the user information list.
Windows 2 Search active directory.
Principal Type
Name Value Description
All 15 Return all entity types.
DistributionList 2 Return distribution list entity types.
None 0 Return no principal types.
SecurityGroup 4 Return security group entity types.
SharePointGroup 8 Return sharepoint group entity types.
User 1 Return user entity types.
Url Zone
Name Value Description
Custom 3 Search the custom zone.
Default 0 Search the default zone.
Extranet 4 Search the extranet zone.
Internet 2 Search the internet zone.
Intranet 1 Search the intranet zone.