Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

UserCollection.GetByLoginName Method

Returns the user with the specified login name.

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

[RemoteAttribute]
public User GetByLoginName(
	string loginName
)

Parameters

loginName
Type: System.String

A string that contains the login name.

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 251.

Return Value

Type: Microsoft.SharePoint.Client.User
A User object that represents the user.

ExceptionCondition
SPException

The user cannot be found. Error code: -2146232832.

UnauthorizedAccessException

Access is denied. Error code: -2147024891.

Show:
© 2015 Microsoft