Language

ITeamsTurnContext Interface

Definition

Provides Teams-specific helpers for working with the current ITurnContext.

public interface ITeamsTurnContext : Microsoft.Agents.Builder.ITurnContext
type ITeamsTurnContext = interface
    interface ITurnContext
Public Interface ITeamsTurnContext
Implements ITurnContext
Derived
Implements

Properties

Name Description
Activity

Gets the current ITeamsActivity, exposing the Activity as a strongly-typed ITeamsActivity instead of IActivity.

Adapter

Gets the Adapter that created this context object.

(Inherited from ITurnContext)
Client

Returns the ApiClient instance registered for Microsoft Teams API access in the current turn context.

Identity (Inherited from ITurnContext)
Responded

Gets a value indicating whether at least one response was sent for the current turn.

(Inherited from ITurnContext)
Services (Inherited from ITurnContext)
StackState (Inherited from ITurnContext)
StreamingResponse

Provides access to the IStreamingResponse to allow streaming of chunked messages (for example, via streaming AI responses).

(Inherited from ITurnContext)

Methods

Name Description
DeleteActivityAsync(ConversationReference, CancellationToken)

Deletes an existing activity.

(Inherited from ITurnContext)
DeleteActivityAsync(String, CancellationToken)

Deletes an existing activity.

(Inherited from ITurnContext)
GetAppGraphClient(String)

Creates a Microsoft.Graph.GraphServiceClient authenticated with an app-only (application) token, using the token connection resolved for the current turn.

GetAppGraphClientForConnection(String, String)

Creates a Microsoft.Graph.GraphServiceClient authenticated with an app-only (application) token, using the named token connection.

GetGraphClient(String, String)

Creates a Microsoft.Graph.GraphServiceClient authenticated with a delegated (user) token for the signed-in user of the current turn.

OnDeleteActivity(DeleteActivityHandler)

Adds a response handler for delete activity operations.

(Inherited from ITurnContext)
OnSendActivities(SendActivitiesHandler)

Adds a response handler for send activity operations.

(Inherited from ITurnContext)
OnUpdateActivity(UpdateActivityHandler)

Adds a response handler for update activity operations.

(Inherited from ITurnContext)
SendActivitiesAsync(IActivity[], CancellationToken)

Sends a set of activities to the sender of the incoming activity.

(Inherited from ITurnContext)
SendActivityAsync(IActivity, CancellationToken)

Sends an activity to the sender of the incoming activity.

(Inherited from ITurnContext)
SendActivityAsync(String, String, String, CancellationToken)

Sends a message activity to the sender of the incoming activity.

(Inherited from ITurnContext)
SendTargetedActivitiesAsync(IActivity[], CancellationToken)

Sends a set of activities to targeted recipients within the current turn context asynchronously.

SendTargetedActivityAsync(IActivity, CancellationToken)

Sends an activity to the conversation with a targeted treatment, allowing the activity to be directed to a specific recipient or group within the conversation.

TraceActivityAsync(String, Object, String, String, CancellationToken)

Sends a trace activity to the IChannelAdapter for logging purposes.

(Inherited from ITurnContext)
UpdateActivityAsync(IActivity, CancellationToken)

Replaces an existing activity.

(Inherited from ITurnContext)

Extension Methods

Name Description
ExchangeTurnTokenAsync(ITurnContext, String, String, IList<String>, CancellationToken)
GetDebugger(ITurnContext)

Extension method to get IDialogDebugger from TurnContext.

GetTurnTokenAsync(ITurnContext, String, CancellationToken)
GetTurnTokens(ITurnContext)
IsAgenticRequest(ITurnContext)

Applies to