SPClaimProviderManager.CreateUserClaim method (String, SPOriginalIssuerType, String)
Creates an object that represents the SPClaim for the user.
Namespace: Microsoft.SharePoint.Administration.Claims
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Shared Function CreateUserClaim ( _
userIdentifier As String, _
issuerType As SPOriginalIssuerType, _
issuerIdentifier As String _
) As SPClaim
'Usage
Dim userIdentifier As String
Dim issuerType As SPOriginalIssuerType
Dim issuerIdentifier As String
Dim returnValue As SPClaim
returnValue = SPClaimProviderManager.CreateUserClaim(userIdentifier, _
issuerType, issuerIdentifier)
public static SPClaim CreateUserClaim(
string userIdentifier,
SPOriginalIssuerType issuerType,
string issuerIdentifier
)
Parameters
userIdentifier
Type: System.StringA string that represents the unique identifier for the user.
issuerType
Type: Microsoft.SharePoint.Administration.Claims.SPOriginalIssuerTypeAn object that represents the type of issuer for the user identifier.
issuerIdentifier
Type: System.StringA string that represents the identifier for the issuer type.
Return value
Type: Microsoft.SharePoint.Administration.Claims.SPClaim
An object that contains the claim object for the user.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The userIdentifier parameter is a null reference (Nothing in Visual Basic). The issuerType parameter requires an identifier and the issuerIdentifier parameter is a null reference (Nothing in Visual Basic). |
ArgumentException | The issuerType parameter is not valid or a null reference (Nothing in Visual Basic). The trusted login provider for the issuerIdentifier parameter is a null reference (Nothing in Visual Basic). The original issuer type cannot be established. |