Language

TeamsBotApplication.ReplyAsync Method

Definition

Overloads

Name Description
ReplyAsync(String, String, TeamsActivityInput, Uri, AgenticIdentity, CancellationToken)

Sends an activity proactively as a threaded reply. Constructs a threaded conversation ID from the conversation ID and message ID.

ReplyAsync(String, String, String, Uri, AgenticIdentity, CancellationToken)

Sends a text message proactively as a threaded reply. Constructs a threaded conversation ID from the conversation ID and message ID.

ReplyAsync(String, String, TeamsActivityInput, Uri, AgenticIdentity, CancellationToken)

Sends an activity proactively as a threaded reply. Constructs a threaded conversation ID from the conversation ID and message ID.

public System.Threading.Tasks.Task<Microsoft.Teams.Core.SendActivityResponse?> ReplyAsync(string conversationId, string messageId, Microsoft.Teams.Apps.Schema.TeamsActivityInput activity, Uri? serviceUrl = default, Microsoft.Teams.Core.Schema.AgenticIdentity? agenticIdentity = default, System.Threading.CancellationToken cancellationToken = default);
member this.ReplyAsync : string * string * Microsoft.Teams.Apps.Schema.TeamsActivityInput * Uri * Microsoft.Teams.Core.Schema.AgenticIdentity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Teams.Core.SendActivityResponse>
Public Function ReplyAsync (conversationId As String, messageId As String, activity As TeamsActivityInput, Optional serviceUrl As Uri = Nothing, Optional agenticIdentity As AgenticIdentity = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of SendActivityResponse)

Parameters

conversationId
String

The conversation ID.

messageId
String

The thread root message ID.

activity
TeamsActivityInput

The activity to send.

serviceUrl
Uri

The service URL. If null, uses the last-seen service URL from an incoming activity.

agenticIdentity
AgenticIdentity

The agentic identity for user-delegated token acquisition. Extract from the inbound activity's Recipient via GetAgenticIdentity().

cancellationToken
CancellationToken

A cancellation token.

Returns

The response from the send operation.

Applies to

ReplyAsync(String, String, String, Uri, AgenticIdentity, CancellationToken)

Sends a text message proactively as a threaded reply. Constructs a threaded conversation ID from the conversation ID and message ID.

public System.Threading.Tasks.Task<Microsoft.Teams.Core.SendActivityResponse?> ReplyAsync(string conversationId, string messageId, string text, Uri? serviceUrl = default, Microsoft.Teams.Core.Schema.AgenticIdentity? agenticIdentity = default, System.Threading.CancellationToken cancellationToken = default);
member this.ReplyAsync : string * string * string * Uri * Microsoft.Teams.Core.Schema.AgenticIdentity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Teams.Core.SendActivityResponse>
Public Function ReplyAsync (conversationId As String, messageId As String, text As String, Optional serviceUrl As Uri = Nothing, Optional agenticIdentity As AgenticIdentity = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of SendActivityResponse)

Parameters

conversationId
String

The conversation ID.

messageId
String

The thread root message ID.

text
String

The text to send.

serviceUrl
Uri

The service URL. If null, uses the last-seen service URL from an incoming activity.

agenticIdentity
AgenticIdentity

The agentic identity for user-delegated token acquisition. Extract from the inbound activity's Recipient via GetAgenticIdentity().

cancellationToken
CancellationToken

A cancellation token.

Returns

The response from the send operation.

Applies to