共用方式為


SPClaimProviderManager.CreateUserClaim Method (String, SPOriginalIssuerType)

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 _
) As SPClaim
'Usage
Dim userIdentifier As String
Dim issuerType As SPOriginalIssuerType
Dim returnValue As SPClaim

returnValue = SPClaimProviderManager.CreateUserClaim(userIdentifier, _
    issuerType)
public static SPClaim CreateUserClaim(
    string userIdentifier,
    SPOriginalIssuerType issuerType
)

Parameters

  • userIdentifier
    Type: System.String

    A string that represents the unique identifier for the user.

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

ArgumentException

The issuerType parameter requires an identifier.

See Also

Reference

SPClaimProviderManager Class

SPClaimProviderManager Members

CreateUserClaim Overload

Microsoft.SharePoint.Administration.Claims Namespace