Share via


UserCollection.GetById method

Returns the user with the specified member ID.

Namespace:  Microsoft.SharePoint.Client
Assembly:  Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)

Syntax

'Declaration
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)
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