MessageExtension.OnQuerySettingUrl Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Registers a handler that invokes the fetch of the configuration settings for a Message Extension.
public Microsoft.Agents.Extensions.MSTeams.MessageExtensions.MessageExtension OnQuerySettingUrl(Microsoft.Agents.Extensions.MSTeams.MessageExtensions.QuerySettingUrlHandler handler, string[] autoSignInHandlers = default, ushort rank = 32767);
member this.OnQuerySettingUrl : Microsoft.Agents.Extensions.MSTeams.MessageExtensions.QuerySettingUrlHandler * string[] * uint16 -> Microsoft.Agents.Extensions.MSTeams.MessageExtensions.MessageExtension
Public Function OnQuerySettingUrl (handler As QuerySettingUrlHandler, Optional autoSignInHandlers As String() = Nothing, Optional rank As UShort = 32767) As MessageExtension
Parameters
- handler
- QuerySettingUrlHandler
Function to call when the event is triggered.
- autoSignInHandlers
- String[]
OAuth sign-in handler names for automatic sign-in before the route handler is invoked. Specify null to skip automatic sign-in.
- rank
- UInt16
Route evaluation order. Lower values run first. Defaults to Unspecified.
Returns
The application instance for chaining purposes.
Remarks
``` TeamsExtension.MessageExtensions.OnQuerySettingUrl((ctx, state, ct) => Task.FromResult(new Response { ComposeExtension = new Result { Type = ResultType.Config, SuggestedActions = new SuggestedActions { Actions = [new CardAction { Type = "openUrl", Value = "https://example.com/config" }] } } })); ``` Alternatively, the TeamsQuerySettingUrlRouteAttribute can be used to decorate a QuerySettingUrlHandler method for the same purpose.