Export (0) Print
Expand All

Utility.SearchPrincipals method

Returns the collection of principals that partially or uniquely match the specified search criteria.

Namespace:  Microsoft.SharePoint.Client.Utilities
Assemblies:   Microsoft.SharePoint.Client.Silverlight (in Microsoft.SharePoint.Client.Silverlight.dll);  Microsoft.SharePoint.Client.Phone (in Microsoft.SharePoint.Client.Phone.dll)  Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)

public static IList<PrincipalInfo> SearchPrincipals(
	ClientRuntimeContext context,
	Web web,
	string input,
	PrincipalType scopes,
	PrincipalSource sources,
	UserCollection usersContainer,
	int maxCount
)

Parameters

context
Type: Microsoft.SharePoint.Client.ClientRuntimeContext
web
Type: Microsoft.SharePoint.Client.Web

Specifies the site to be used when searching for a principal.

It must not be NULL.

input
Type: System.String

Specifies the value to be used when searching for a principal.

If this is not the display name, e-mail address, or login name of a principal, the server must return NULL.

It must not be NULL. Its length must be equal to or less than 255.

scopes
Type: Microsoft.SharePoint.Client.Utilities.PrincipalType

Specifies the type to be used when searching for a principal.

sources
Type: Microsoft.SharePoint.Client.Utilities.PrincipalSource

Specifies the source to be used when searching for a principal.

usersContainer
Type: Microsoft.SharePoint.Client.UserCollection

Specifies the collection of users to be used when searching for a principal.

maxCount
Type: System.Int32

Specifies the maximum number of principals to be returned in the list.

If the value is equal to or less than 0, the server must return an empty collection.

Return value

Type: System.Collections.Generic.IList<PrincipalInfo>
Returns a IList<T> instance representing the collection of principals that partially or uniquely match the specified search criteria.

ExceptionCondition
[System.UnauthorizedAccessException]

The current user has insufficient permissions. Error code: -2147024891.

Show:
© 2015 Microsoft