Share via


AzureServiceTokenProvider.GetAccessTokenAsync Method

Definition

Overloads

GetAccessTokenAsync(String, String)
GetAccessTokenAsync(String, Boolean, CancellationToken)
GetAccessTokenAsync(String, String, CancellationToken)
GetAccessTokenAsync(String, String, Boolean, CancellationToken)

GetAccessTokenAsync(String, String)

public virtual System.Threading.Tasks.Task<string> GetAccessTokenAsync (string resource, string tenantId);
abstract member GetAccessTokenAsync : string * string -> System.Threading.Tasks.Task<string>
override this.GetAccessTokenAsync : string * string -> System.Threading.Tasks.Task<string>
Public Overridable Function GetAccessTokenAsync (resource As String, tenantId As String) As Task(Of String)

Parameters

resource
String
tenantId
String

Returns

Applies to

GetAccessTokenAsync(String, Boolean, CancellationToken)

public virtual System.Threading.Tasks.Task<string> GetAccessTokenAsync (string resource, bool forceRefresh, System.Threading.CancellationToken cancellationToken = default);
abstract member GetAccessTokenAsync : string * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
override this.GetAccessTokenAsync : string * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
Public Overridable Function GetAccessTokenAsync (resource As String, forceRefresh As Boolean, Optional cancellationToken As CancellationToken = Nothing) As Task(Of String)

Parameters

resource
String
forceRefresh
Boolean
cancellationToken
CancellationToken

Returns

Applies to

GetAccessTokenAsync(String, String, CancellationToken)

public virtual System.Threading.Tasks.Task<string> GetAccessTokenAsync (string resource, string tenantId = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetAccessTokenAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
override this.GetAccessTokenAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
Public Overridable Function GetAccessTokenAsync (resource As String, Optional tenantId As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of String)

Parameters

resource
String
tenantId
String
cancellationToken
CancellationToken

Returns

Applies to

GetAccessTokenAsync(String, String, Boolean, CancellationToken)

public virtual System.Threading.Tasks.Task<string> GetAccessTokenAsync (string resource, string tenantId, bool forceRefresh, System.Threading.CancellationToken cancellationToken = default);
abstract member GetAccessTokenAsync : string * string * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
override this.GetAccessTokenAsync : string * string * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
Public Overridable Function GetAccessTokenAsync (resource As String, tenantId As String, forceRefresh As Boolean, Optional cancellationToken As CancellationToken = Nothing) As Task(Of String)

Parameters

resource
String
tenantId
String
forceRefresh
Boolean
cancellationToken
CancellationToken

Returns

Applies to