IAccessTokenProvider.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.
Used by Agents SDK to acquire access tokens for connection to agent services or clients.
public System.Threading.Tasks.Task<string> GetAccessTokenAsync(string resourceUrl, System.Collections.Generic.IList<string> scopes, bool forceRefresh = false);
abstract member GetAccessTokenAsync : string * System.Collections.Generic.IList<string> * bool -> System.Threading.Tasks.Task<string>
Public Function GetAccessTokenAsync (resourceUrl As String, scopes As IList(Of String), Optional forceRefresh As Boolean = false) As Task(Of String)
Parameters
- resourceUrl
- String
The resource URL for which to get the token.
- forceRefresh
- Boolean
True to force a refresh of the token; or false to get the token only if it is necessary.