Utility.ResolvePrincipal method
Returns information about a principal that matches the specified search criteria. If no matches are found, the server must return NULL.
Namespace: Microsoft.SharePoint.Client.Utilities
Assembly: Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)
Syntax
'Declaration
Public Shared Function ResolvePrincipal ( _
context As ClientRuntimeContext, _
web As Web, _
input As String, _
scopes As PrincipalType, _
sources As PrincipalSource, _
usersContainer As UserCollection, _
inputIsEmailOnly As Boolean _
) As ClientResult(Of PrincipalInfo)
'Usage
Dim context As ClientRuntimeContext
Dim web As Web
Dim input As String
Dim scopes As PrincipalType
Dim sources As PrincipalSource
Dim usersContainer As UserCollection
Dim inputIsEmailOnly As Boolean
Dim returnValue As ClientResult(Of PrincipalInfo)
returnValue = Utility.ResolvePrincipal(context, _
web, input, scopes, sources, usersContainer, _
inputIsEmailOnly)
public static ClientResult<PrincipalInfo> ResolvePrincipal(
ClientRuntimeContext context,
Web web,
string input,
PrincipalType scopes,
PrincipalSource sources,
UserCollection usersContainer,
bool inputIsEmailOnly
)
Parameters
- context
Type: Microsoft.SharePoint.Client.ClientRuntimeContext
web
Type: Microsoft.SharePoint.Client.WebSpecifies the site to be used when searching for a principal.
It must not be NULL.
input
Type: System.StringSpecifies 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
Its length must be equal to or less than 255.
scopes
Type: Microsoft.SharePoint.Client.Utilities.PrincipalTypeSpecifies the type to be used when searching for a principal.
sources
Type: Microsoft.SharePoint.Client.Utilities.PrincipalSourceSpecifies the source to be used when searching for a principal.
usersContainer
Type: Microsoft.SharePoint.Client.UserCollectionSpecifies the collection of users to be used when searching for a principal.
inputIsEmailOnly
Type: System.BooleanSpecifies whether only the e-mail address will be used when searching for a principal.
Return value
Type: Microsoft.SharePoint.Client.ClientResult<PrincipalInfo>
Returns a ClientResult<T> instance representing tools for converting date and time formats, for obtaining information from user names, for modifying access to sites, and for various other tasks in managing deployment.
Exceptions
Exception | Condition |
---|---|
[System.UnauthorizedAccessException] | The current user has insufficient permissions. Error code: -2147024891. |