SPActiveDirectoryClaimProvider.GetNTAccountFromClaim method (SPClaim)
Extracts the equivalent NTAccount information from a claim representing an Active Directory user or security group.
Namespace: Microsoft.SharePoint.Administration.Claims
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Shared Function GetNTAccountFromClaim ( _
claim As SPClaim _
) As NTAccount
'Usage
Dim claim As SPClaim
Dim returnValue As NTAccount
returnValue = SPActiveDirectoryClaimProvider.GetNTAccountFromClaim(claim)
public static NTAccount GetNTAccountFromClaim(
SPClaim claim
)
Parameters
claim
Type: Microsoft.SharePoint.Administration.Claims.SPClaimA claim object representing an Active Directory user (see CreateUserClaim(String)) or security group user (see CreateSecurityGroupClaim(String)).
Return value
Type: System.Security.Principal.NTAccount
An object that represents the NT account.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | SPClaim is a null reference (Nothing in Visual Basic). |
ArgumentException | The claim user and claim security group do not exist. |
See also
Reference
SPActiveDirectoryClaimProvider class
SPActiveDirectoryClaimProvider members