Udostępnij za pośrednictwem


IConfidentialClientApplication.AcquireTokenForClientAsync Method

Definition

Overloads

AcquireTokenForClientAsync(IEnumerable<String>)
Obsolete.

[V2 API] Acquires token from the service for the confidential client. This method attempts to look up valid access token in the cache.

AcquireTokenForClientAsync(IEnumerable<String>, Boolean)
Obsolete.

[V2 API] Acquires token from the service for the confidential client. This method attempts to look up valid access token in the cache.

AcquireTokenForClientAsync(IEnumerable<String>)

Caution

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

[V2 API] Acquires token from the service for the confidential client. This method attempts to look up valid access token in the cache.

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

Parameters

scopes
IEnumerable<String>

Array of scopes requested for resource

Returns

Authentication result containing application token for the requested scopes

Attributes

Applies to

AcquireTokenForClientAsync(IEnumerable<String>, Boolean)

Caution

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

[V2 API] Acquires token from the service for the confidential client. This method attempts to look up valid access token in the cache.

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

Parameters

scopes
IEnumerable<String>

Array of scopes requested for resource

forceRefresh
Boolean

If TRUE, API will ignore the access token in the cache and attempt to acquire new access token using client credentials

Returns

Authentication result containing application token for the requested scopes

Attributes

Applies to