Share via


SPActiveDirectoryClaimProvider.CreateUserClaim method

Creates a claim representing an Active Directory user.

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

Syntax

'Declaration
Public Shared Function CreateUserClaim ( _
    samAccountName As String _
) As SPClaim
'Usage
Dim samAccountName As String
Dim returnValue As SPClaim

returnValue = SPActiveDirectoryClaimProvider.CreateUserClaim(samAccountName)
public static SPClaim CreateUserClaim(
    string samAccountName
)

Parameters

  • samAccountName
    Type: System.String

    An Active Directory user name in the format of <domain>\<username> (for example, contoso\bobsmith ).

Return value

Type: Microsoft.SharePoint.Administration.Claims.SPClaim
Returns SPClaim.

Exceptions

Exception Condition
ArgumentNullException

samAccountName parameter is a null reference (Nothing in Visual Basic).

See also

Reference

SPActiveDirectoryClaimProvider class

SPActiveDirectoryClaimProvider members

Microsoft.SharePoint.Administration.Claims namespace