SP.Utilities.Utility.searchPrincipals(Context, web, input, scopes, sources, usersContainer, maxCount) Method

SharePoint 2010

Last modified: May 24, 2011

Applies to: SharePoint Foundation 2010

In this article
Return Value
Remarks
Applies To

Gets information about the principals that match the specified Search criteria.

var value = SP.Utilities.Utility.searchPrincipals(Context, web, input, scopes, sources, usersContainer, maxCount);

Context

Type: SP.ClientRuntimeContext

The runtime context for accessing data from and invoking methods on remote objects.

web

Type: SP.Web

The site to be used when searching for the principals.

input

Type: string

The display name, email address, or login name of the principals.

scopes

Type: SP.Utilities.PrincipalType

The type of the principals.

sources

Type: SP.Utilities.PrincipalSource

The source of the principals.

usersContainer

Type: SP.UserCollection

The users containing the principals.

maxCount

Type: int

The maximum number of information entries about principals to return.

Type: SP.Utilities.PrincipalInfo[]

The list of principal information.

This method returns an empty list if maxCount is less than 1, scopes is SP.Utilities.PrincipalType.None, sources is SP.Utilities.PrincipalSource.None, or input is null or empty.

UnauthorizedAccessException

The current user has insufficient permissions.

Show: