UserToken.GetAadTokensWithHttpMessagesAsync 方法

定义

使用 HTTP 消息获取 AAD 令牌。

public System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<System.Collections.Generic.IDictionary<string,Microsoft.Bot.Schema.TokenResponse>>> GetAadTokensWithHttpMessagesAsync (string userId, string connectionName, Microsoft.Bot.Schema.AadResourceUrls aadResourceUrls, string channelId = default, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetAadTokensWithHttpMessagesAsync : string * string * Microsoft.Bot.Schema.AadResourceUrls * string * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<System.Collections.Generic.IDictionary<string, Microsoft.Bot.Schema.TokenResponse>>>
override this.GetAadTokensWithHttpMessagesAsync : string * string * Microsoft.Bot.Schema.AadResourceUrls * string * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<System.Collections.Generic.IDictionary<string, Microsoft.Bot.Schema.TokenResponse>>>
Public Function GetAadTokensWithHttpMessagesAsync (userId As String, connectionName As String, aadResourceUrls As AadResourceUrls, Optional channelId As String = Nothing, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of HttpOperationResponse(Of IDictionary(Of String, TokenResponse)))

参数

userId
String

用户 ID。

connectionName
String

连接名称。

aadResourceUrls
AadResourceUrls

AAD 资源 URL。

channelId
String

通道 ID。

customHeaders
Dictionary<String,List<String>>

将添加到请求的标头。

cancellationToken
CancellationToken

取消标记。

返回

Task<Microsoft.Rest.HttpOperationResponse<IDictionary<String,TokenResponse>>>

包含响应正文和响应标头的响应对象。

实现

例外

操作返回无效状态代码时引发。

Microsoft.Rest.SerializationException

无法反序列化响应时引发。

Microsoft.Rest.ValidationException

当所需的参数为 null 时引发。

当输入值与预期的数据类型、范围或模式不匹配时引发。

适用于