Language

TeamsAppExtensions.OnTeamsActivity Method

Definition

Overloads

Name Description
OnTeamsActivity(AgentApplication, String, TeamsRouteHandler, UInt16, String[], Boolean)

Registers a Teams activity handler for the specified activity type.

OnTeamsActivity(AgentApplication, Regex, TeamsRouteHandler, UInt16, String[], Boolean)

Registers a Teams activity handler for activity types that match the supplied pattern.

OnTeamsActivity(AgentApplication, String, TeamsRouteHandler, UInt16, String[], Boolean)

Registers a Teams activity handler for the specified activity type.

public static Microsoft.Agents.Builder.App.AgentApplication OnTeamsActivity(this Microsoft.Agents.Builder.App.AgentApplication app, string type, Microsoft.Agents.Extensions.MSTeams.App.TeamsRouteHandler handler, ushort rank = 32767, string[] autoSignInHandlers = default, bool isAgenticOnly = false);
static member OnTeamsActivity : Microsoft.Agents.Builder.App.AgentApplication * string * Microsoft.Agents.Extensions.MSTeams.App.TeamsRouteHandler * uint16 * string[] * bool -> Microsoft.Agents.Builder.App.AgentApplication
<Extension()>
Public Function OnTeamsActivity (app As AgentApplication, type As String, handler As TeamsRouteHandler, Optional rank As UShort = 32767, Optional autoSignInHandlers As String() = Nothing, Optional isAgenticOnly As Boolean = false) As AgentApplication

Parameters

app
AgentApplication

The agent application to configure.

type
String

The exact activity type to match.

handler
TeamsRouteHandler

The Teams-aware handler to invoke.

rank
UInt16

The route evaluation order. Lower values run first.

autoSignInHandlers
String[]

The OAuth sign-in handlers to associate with the route.

isAgenticOnly
Boolean

When true, the route only fires for agentic turns.

Returns

The configured agent application.

Applies to

OnTeamsActivity(AgentApplication, Regex, TeamsRouteHandler, UInt16, String[], Boolean)

Registers a Teams activity handler for activity types that match the supplied pattern.

public static Microsoft.Agents.Builder.App.AgentApplication OnTeamsActivity(this Microsoft.Agents.Builder.App.AgentApplication app, System.Text.RegularExpressions.Regex typePattern, Microsoft.Agents.Extensions.MSTeams.App.TeamsRouteHandler handler, ushort rank = 32767, string[] autoSignInHandlers = default, bool isAgenticOnly = false);
static member OnTeamsActivity : Microsoft.Agents.Builder.App.AgentApplication * System.Text.RegularExpressions.Regex * Microsoft.Agents.Extensions.MSTeams.App.TeamsRouteHandler * uint16 * string[] * bool -> Microsoft.Agents.Builder.App.AgentApplication
<Extension()>
Public Function OnTeamsActivity (app As AgentApplication, typePattern As Regex, handler As TeamsRouteHandler, Optional rank As UShort = 32767, Optional autoSignInHandlers As String() = Nothing, Optional isAgenticOnly As Boolean = false) As AgentApplication

Parameters

app
AgentApplication

The agent application to configure.

typePattern
Regex

The regular expression used to match activity types.

handler
TeamsRouteHandler

The Teams-aware handler to invoke.

rank
UInt16

The route evaluation order. Lower values run first.

autoSignInHandlers
String[]

The OAuth sign-in handlers to associate with the route.

isAgenticOnly
Boolean

When true, the route only fires for agentic turns.

Returns

The configured agent application.

Applies to