AuthenticationResult Constructors

Definition

Overloads

AuthenticationResult(String, Boolean, String, DateTimeOffset, DateTimeOffset, String, IAccount, String, IEnumerable<String>, Guid, AuthenticationResultMetadata, String)

Constructor meant to help application developers test their apps. Allows mocking of authentication flows. App developers should never new-up AuthenticationResult in product code.

AuthenticationResult(String, Boolean, String, DateTimeOffset, DateTimeOffset, String, IAccount, String, IEnumerable<String>, Guid, String, AuthenticationResultMetadata, ClaimsPrincipal, String, IReadOnlyDictionary<String,String>)

Constructor meant to help application developers test their apps. Allows mocking of authentication flows. App developers should never new-up AuthenticationResult in product code.

AuthenticationResult(String, Boolean, String, DateTimeOffset, DateTimeOffset, String, IAccount, String, IEnumerable<String>, Guid, AuthenticationResultMetadata, String)

Constructor meant to help application developers test their apps. Allows mocking of authentication flows. App developers should never new-up AuthenticationResult in product code.

public AuthenticationResult (string accessToken, bool isExtendedLifeTimeToken, string uniqueId, DateTimeOffset expiresOn, DateTimeOffset extendedExpiresOn, string tenantId, Microsoft.Identity.Client.IAccount account, string idToken, System.Collections.Generic.IEnumerable<string> scopes, Guid correlationId, Microsoft.Identity.Client.AuthenticationResultMetadata authenticationResultMetadata, string tokenType = "Bearer");
new Microsoft.Identity.Client.AuthenticationResult : string * bool * string * DateTimeOffset * DateTimeOffset * string * Microsoft.Identity.Client.IAccount * string * seq<string> * Guid * Microsoft.Identity.Client.AuthenticationResultMetadata * string -> Microsoft.Identity.Client.AuthenticationResult
Public Sub New (accessToken As String, isExtendedLifeTimeToken As Boolean, uniqueId As String, expiresOn As DateTimeOffset, extendedExpiresOn As DateTimeOffset, tenantId As String, account As IAccount, idToken As String, scopes As IEnumerable(Of String), correlationId As Guid, authenticationResultMetadata As AuthenticationResultMetadata, Optional tokenType As String = "Bearer")

Parameters

accessToken
String

Access Token that can be used as a bearer token to access protected web APIs

isExtendedLifeTimeToken
Boolean

See IsExtendedLifeTimeToken

uniqueId
String

Unique Id of the account. It can be null. When the IdToken is not null, this is its ID, that is its ObjectId claim, or if that claim is null, the Subject claim.

expiresOn
DateTimeOffset

Expiry date-time for the access token

extendedExpiresOn
DateTimeOffset

See ExtendedExpiresOn

tenantId
String

Identifier for the Azure AD tenant from which the token was acquired. Can be null

account
IAccount

Account information

idToken
String

ID token

scopes
IEnumerable<String>

Granted scope values as returned by the service

correlationId
Guid

The correlation id of the authentication request

authenticationResultMetadata
AuthenticationResultMetadata

Contains metadata related to the Authentication Result.

tokenType
String

The token type, defaults to Bearer. Note: this property is experimental and may change in future versions of the library.

Remarks

For backwards compatibility with MSAL 4.17-4.20

Applies to

AuthenticationResult(String, Boolean, String, DateTimeOffset, DateTimeOffset, String, IAccount, String, IEnumerable<String>, Guid, String, AuthenticationResultMetadata, ClaimsPrincipal, String, IReadOnlyDictionary<String,String>)

Constructor meant to help application developers test their apps. Allows mocking of authentication flows. App developers should never new-up AuthenticationResult in product code.

public AuthenticationResult (string accessToken, bool isExtendedLifeTimeToken, string uniqueId, DateTimeOffset expiresOn, DateTimeOffset extendedExpiresOn, string tenantId, Microsoft.Identity.Client.IAccount account, string idToken, System.Collections.Generic.IEnumerable<string> scopes, Guid correlationId, string tokenType = "Bearer", Microsoft.Identity.Client.AuthenticationResultMetadata authenticationResultMetadata = default, System.Security.Claims.ClaimsPrincipal claimsPrincipal = default, string spaAuthCode = default, System.Collections.Generic.IReadOnlyDictionary<string,string> additionalResponseParameters = default);
new Microsoft.Identity.Client.AuthenticationResult : string * bool * string * DateTimeOffset * DateTimeOffset * string * Microsoft.Identity.Client.IAccount * string * seq<string> * Guid * string * Microsoft.Identity.Client.AuthenticationResultMetadata * System.Security.Claims.ClaimsPrincipal * string * System.Collections.Generic.IReadOnlyDictionary<string, string> -> Microsoft.Identity.Client.AuthenticationResult
Public Sub New (accessToken As String, isExtendedLifeTimeToken As Boolean, uniqueId As String, expiresOn As DateTimeOffset, extendedExpiresOn As DateTimeOffset, tenantId As String, account As IAccount, idToken As String, scopes As IEnumerable(Of String), correlationId As Guid, Optional tokenType As String = "Bearer", Optional authenticationResultMetadata As AuthenticationResultMetadata = Nothing, Optional claimsPrincipal As ClaimsPrincipal = Nothing, Optional spaAuthCode As String = Nothing, Optional additionalResponseParameters As IReadOnlyDictionary(Of String, String) = Nothing)

Parameters

accessToken
String

Access Token that can be used as a bearer token to access protected web APIs

isExtendedLifeTimeToken
Boolean

See IsExtendedLifeTimeToken

uniqueId
String

Unique Id of the account. It can be null. When the IdToken is not null, this is its ID, that is its ObjectId claim, or if that claim is null, the Subject claim.

expiresOn
DateTimeOffset

Expiry date-time for the access token

extendedExpiresOn
DateTimeOffset

See ExtendedExpiresOn

tenantId
String

Identifier for the Azure AD tenant from which the token was acquired. Can be null

account
IAccount

Account information

idToken
String

ID token

scopes
IEnumerable<String>

Granted scope values as returned by the service

correlationId
Guid

The correlation id of the authentication request

tokenType
String

The token type, defaults to Bearer. Note: this property is experimental and may change in future versions of the library.

authenticationResultMetadata
AuthenticationResultMetadata

Contains metadata related to the Authentication Result.

claimsPrincipal
ClaimsPrincipal

Claims from the ID token

spaAuthCode
String

Auth Code returned by the Microsoft identity platform when you use AcquireTokenByAuthorizationCode.WithSpaAuthorizationCode(). This auth code is meant to be redeemed by the frontend code. See https://aka.ms/msal-net/spa-auth-code

additionalResponseParameters
IReadOnlyDictionary<String,String>

Other properties from the token response.

Applies to