Condividi tramite


IAccessTokenProvider.GetAccessTokenAsync Method

Definition

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.

scopes
IList<String>

The scopes 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.

Returns

Applies to