MsGraphAuthProvider.GetAccessTokenAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.