UserCollection.GetById Method

Returns the user with the specified member ID.

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 GetById ( _
    id As Integer _
) As User
'Usage
Dim instance As UserCollection
Dim id As Integer
Dim returnValue As User

returnValue = instance.GetById(id)
[RemoteAttribute]
public User GetById(
    int id
)

Parameters

  • id
    Type: System.Int32

    A 32-bit integer that specifies the member identifier.

Return Value

Type: Microsoft.SharePoint.Client.User
Returns a User instance representing the user with the specified member ID.

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