Language

ConversationClient.GetConversationMemberAsync<T> Method

Definition

Gets a specific member of a conversation with strongly-typed result.

public virtual System.Threading.Tasks.Task<T> GetConversationMemberAsync<T>(string conversationId, string userId, Uri serviceUrl, Microsoft.Teams.Core.Http.BotRequestContext? requestContext = default, System.Collections.Generic.Dictionary<string,string>? customHeaders = default, System.Threading.CancellationToken cancellationToken = default) where T : Microsoft.Teams.Core.Schema.ChannelAccount;
abstract member GetConversationMemberAsync : string * string * Uri * Microsoft.Teams.Core.Http.BotRequestContext * System.Collections.Generic.Dictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T (requires 'T :> Microsoft.Teams.Core.Schema.ChannelAccount)> (requires 'T :> Microsoft.Teams.Core.Schema.ChannelAccount)
override this.GetConversationMemberAsync : string * string * Uri * Microsoft.Teams.Core.Http.BotRequestContext * System.Collections.Generic.Dictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T (requires 'T :> Microsoft.Teams.Core.Schema.ChannelAccount)> (requires 'T :> Microsoft.Teams.Core.Schema.ChannelAccount)
Public Overridable Function GetConversationMemberAsync(Of T As ChannelAccount) (conversationId As String, userId As String, serviceUrl As Uri, Optional requestContext As BotRequestContext = Nothing, Optional customHeaders As Dictionary(Of String, String) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of T)

Type Parameters

T

The type of conversation account to return. Must inherit from ChannelAccount.

Parameters

conversationId
String

The ID of the conversation. Cannot be null or whitespace.

userId
String

The ID of the user to retrieve. Cannot be null or whitespace.

serviceUrl
Uri

The service URL for the conversation. Cannot be null.

requestContext
BotRequestContext

Optional per-request properties (see BotRequestContext) to stamp onto the request's options.

customHeaders
Dictionary<String,String>

Optional custom headers to include in the request.

cancellationToken
CancellationToken

A cancellation token that can be used to cancel the operation.

Returns

Task<T>

A task that represents the asynchronous operation. The task result contains the conversation member of type T with detailed information about the user.

Exceptions

Thrown if the member could not be retrieved successfully.

Applies to