Udostępnij za pośrednictwem


IConfidentialClientApplication.AcquireTokenByAuthorizationCodeAsync Method

Definition

Caution

Use AcquireTokenByAuthorizationCode instead. See https://aka.ms/msal-net-3-breaking-changes.

[V2 API] Acquires security token from the authority using authorization code previously received. This method does not lookup token cache, but stores the result in it, so it can be looked up using other methods such as AcquireTokenSilentAsync(IEnumerable<String>, IAccount).

[System.Obsolete("Use AcquireTokenByAuthorizationCode instead. See https://aka.ms/msal-net-3-breaking-changes. ", true)]
public System.Threading.Tasks.Task<Microsoft.Identity.Client.AuthenticationResult> AcquireTokenByAuthorizationCodeAsync (string authorizationCode, System.Collections.Generic.IEnumerable<string> scopes);
[<System.Obsolete("Use AcquireTokenByAuthorizationCode instead. See https://aka.ms/msal-net-3-breaking-changes. ", true)>]
abstract member AcquireTokenByAuthorizationCodeAsync : string * seq<string> -> System.Threading.Tasks.Task<Microsoft.Identity.Client.AuthenticationResult>
Public Function AcquireTokenByAuthorizationCodeAsync (authorizationCode As String, scopes As IEnumerable(Of String)) As Task(Of AuthenticationResult)

Parameters

authorizationCode
String

The authorization code received from service authorization endpoint.

scopes
IEnumerable<String>

Array of scopes requested for resource

Returns

Authentication result containing token of the user for the requested scopes

Attributes

Applies to