MsGraphAuthProvider.GetAccessTokenAsync Method

Definition

Caution

This method is deprecated. Please use TokenCredential.GetTokenAsync instead.

Get access token for Microsoft Graph API requests.

[System.Obsolete("This method is deprecated. Please use TokenCredential.GetTokenAsync instead.", false)]
public System.Threading.Tasks.Task<string> GetAccessTokenAsync ();
[<System.Obsolete("This method is deprecated. Please use TokenCredential.GetTokenAsync instead.", false)>]
member this.GetAccessTokenAsync : unit -> System.Threading.Tasks.Task<string>
Public Function GetAccessTokenAsync () As Task(Of String)

Returns

Access token from the credential.

Attributes

Exceptions

When get access token failed due to empty token or unknown other problems.

When SSO token has already expired.

When need user consent to get access token.

When failed to get access token from AAD server.

Applies to