Saml2SecurityTokenHandler.CreateWindowsIdentity Method (String)

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Creates a WindowsIdentity object using the specified User Principal Name (UPN).

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

protected virtual WindowsIdentity CreateWindowsIdentity(
	string upn
)

Parameters

upn
Type: System.String

The UPN to use to create the identity.

Return Value

Type: System.Security.Principal.WindowsIdentity

The Windows identity that was created.

Exception Condition
ArgumentException

upn is null or an empty string.

.NET Framework
Available since 4.5
Return to top
Show: