AppCredentials.GetTokenAsync(Boolean) 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.
Gets an OAuth access token.
public System.Threading.Tasks.Task<string> GetTokenAsync (bool forceRefresh = false);
member this.GetTokenAsync : bool -> System.Threading.Tasks.Task<string>
Public Function GetTokenAsync (Optional forceRefresh As Boolean = false) As Task(Of String)
Parameters
- forceRefresh
- Boolean
True to force a refresh of the token; or false to get a cached token if it exists.
Returns
A task that represents the work queued to execute.
Remarks
If the task is successful, the result contains the access token string.