UserTokenClient.GetAadTokensAsync 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 AAD tokens for a user.
public virtual System.Threading.Tasks.Task<System.Collections.Generic.IDictionary<string,Microsoft.Teams.Core.GetTokenResult>> GetAadTokensAsync(string userId, string connectionName, string channelId, string[]? resourceUrls = default, Microsoft.Teams.Core.Http.BotRequestContext? requestContext = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetAadTokensAsync : string * string * string * string[] * Microsoft.Teams.Core.Http.BotRequestContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IDictionary<string, Microsoft.Teams.Core.GetTokenResult>>
override this.GetAadTokensAsync : string * string * string * string[] * Microsoft.Teams.Core.Http.BotRequestContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IDictionary<string, Microsoft.Teams.Core.GetTokenResult>>
Public Overridable Function GetAadTokensAsync (userId As String, connectionName As String, channelId As String, Optional resourceUrls As String() = Nothing, Optional requestContext As BotRequestContext = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IDictionary(Of String, GetTokenResult))
Parameters
- userId
- String
The user ID.
- connectionName
- String
The connection name.
- channelId
- String
The channel ID.
- resourceUrls
- String[]
The resource URLs.
- requestContext
- BotRequestContext
Optional per-request properties used for authentication.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
A task that represents the asynchronous operation. The result contains a dictionary mapping resource URLs to their token results.