Partilhar via


SPClaimProvider.CreateClaim Method

Creates claims for the claims provider.

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

Syntax

'Declaration
Protected Function CreateClaim ( _
    claimType As String, _
    value As String, _
    valueType As String _
) As SPClaim
'Usage
Dim claimType As String
Dim value As String
Dim valueType As String
Dim returnValue As SPClaim

returnValue = Me.CreateClaim(claimType, _
    value, valueType)
protected SPClaim CreateClaim(
    string claimType,
    string value,
    string valueType
)

Parameters

  • value
    Type: System.String

    The value of the claim. For example, if the claim type is role, a value might be contributor, and if the claim type is first name, a value might be Matt. 

  • valueType
    Type: System.String

    The type of value in the claim. These are all URIs that refer to a string. They often return values from ClaimValueTypes() but that is not required.

Return Value

Type: Microsoft.SharePoint.Administration.Claims.SPClaim
A SPClaim object.

Remarks

This method is a helper function often used within custom implementations of the FillClaimsForEntity() method to help you create SPClaim objects.

See Also

Reference

SPClaimProvider Class

SPClaimProvider Members

Microsoft.SharePoint.Administration.Claims Namespace