共用方式為


IByRefreshToken.AcquireTokenByRefreshTokenAsync Method

Definition

Caution

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

Acquires an access token from an existing refresh token and stores it and the refresh token into the user token cache, where it will be available for further AcquireTokenSilentAsync calls. This method can be used in migration to MSAL from ADAL v2 and in various integration scenarios where you have a RefreshToken available. (see https://aka.ms/msal-net-migration-adal2-msal2)

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

Parameters

scopes
IEnumerable<String>

Scope to request from the token endpoint. Setting this to null or empty will request an access token, refresh token and ID token with default scopes

refreshToken
String

The refresh token from ADAL 2.x

Returns

Attributes

Applies to