Share via


IConnectorClientBuilder.CreateConnectorClientAsync Method

Definition

Creates the connector client asynchronous.

public System.Threading.Tasks.Task<Microsoft.Bot.Connector.IConnectorClient> CreateConnectorClientAsync (string serviceUrl, System.Security.Claims.ClaimsIdentity claimsIdentity, string audience, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateConnectorClientAsync : string * System.Security.Claims.ClaimsIdentity * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Connector.IConnectorClient>
Public Function CreateConnectorClientAsync (serviceUrl As String, claimsIdentity As ClaimsIdentity, audience As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IConnectorClient)

Parameters

serviceUrl
String

The service URL.

claimsIdentity
ClaimsIdentity

The claims claimsIdentity.

audience
String

The target audience for the connector.

cancellationToken
CancellationToken

Cancellation token.

Returns

ConnectorClient instance.

Exceptions

ClaimsIdentity cannot be null. Pass Anonymous ClaimsIdentity if authentication is turned off.

Applies to