SPClaimProviderManager.ConvertSPUserToClaim method

Converts a user into an identity claim.

Namespace:  Microsoft.SharePoint.Administration.Claims
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public SPClaim ConvertSPUserToClaim(
	SPUser user
)

Parameters

user
Type: Microsoft.SharePoint.SPUser

The SPUser user to convert. It may be a user, security group, or distribution list.

Return value

Type: Microsoft.SharePoint.Administration.Claims.SPClaim
The claim representing the identity of a given SPUser.

ExceptionCondition
ArgumentNullException

Thrown when user is a null reference (Nothing in Visual Basic).

ArgumentException

Thrown when the LoginName is empty or a null reference (Nothing in Visual Basic).

Show: