다음을 통해 공유


UserCollection.GetByEmail Method

Returns the user with the specified e-mail address.

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

Syntax

'Declaration
<RemoteAttribute> _
Public Function GetByEmail ( _
    emailAddress As String _
) As User
'Usage
Dim instance As UserCollection
Dim emailAddress As String
Dim returnValue As User

returnValue = instance.GetByEmail(emailAddress)
[RemoteAttribute]
public User GetByEmail(
    string emailAddress
)

Parameters

  • emailAddress
    Type: System.String

    A string that contains the e-mail address of the user.

    It must not be a null reference (Nothing in Visual Basic).

    It must not be empty.

    Its length must be equal to or less than 255.

Return Value

Type: Microsoft.SharePoint.Client.User
Returns a User.instance representing the user with the specified e-mail address.

Exceptions

Exception Condition
[Microsoft.SharePoint.SPException]

User cannot be found. Error code: -2146232832.

[System.UnauthorizedAccessException]

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

See Also

Reference

UserCollection Class

UserCollection Members

Microsoft.SharePoint.Client Namespace