Expand Minimize

Saml2SecurityTokenHandler.CreateAuthenticationStatement Method

.NET Framework 4.5

Creates a SAML 2.0 authentication statement from the specified authentication information.

Namespace:  System.IdentityModel.Tokens
Assembly:  System.IdentityModel (in System.IdentityModel.dll)

protected virtual Saml2AuthenticationStatement CreateAuthenticationStatement(
	AuthenticationInformation authInfo,
	SecurityTokenDescriptor tokenDescriptor


Type: System.Security.Claims.AuthenticationInformation

An AuthenticationInformation object that contains the state to be wrapped as a Saml2AuthenticationStatement object.

Type: System.IdentityModel.Tokens.SecurityTokenDescriptor

The token descriptor.

Return Value

Type: System.IdentityModel.Tokens.Saml2AuthenticationStatement
A Saml2AuthenticationStatement to add to the assertion being created or null to ignore the AuthenticationInformation object (and not create a SAML 2.0 authentication statement).


tokenDescriptor is null.


The Subject property of tokenDescriptor is null.


The subject of the tokenDescriptor (the Subject property) contains claims with a claim type of either AuthenticationInstant or AuthenticationMethod but does not contain at least one claim of each type.


The authentication method specified by the subject of the tokenDescriptor cannot be resolved to an absolute URI.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft