Forum Discussion

PlanetEstream's avatar
PlanetEstream
Copper Contributor
Apr 08, 2020

Messaging Extension (V3 SDK) Settings / Configuration

I've created a messaging extension based on the sample app provided on the https://docs.microsoft.com/en-us/microsoftteams/platform/tutorials/get-started-dotnet-app-studio guide for Teams in C#. The extension queries my company's product for data and returns it in a list, from which the user can select a card to insert into the conversation, which contains a link to view that data on our service. This works fine pointing at one of our test sites.

 

However, my customers have their own instances of the product, so they need to be able to configure the extension to point at their own instance. I'm following the https://docs.microsoft.com/en-us/microsoftteams/platform/resources/messaging-extension-v3/search-extensions for search based messaging extensions which says I should be able to do this by adding canUpdateConfiguration to my manifest. This brings up a greyed out settings option when right-clicking the extension in Teams.

 

However it also says I need to use onQuerySettingsUrl and onSettingsUpdate event handlers, but is incredibly vague, and I cannot find further documentation or help on how to actually write/implement either of these things anywhere. It seems like such a simple task and we're so close to having this basic extension finished that it's getting quite frustrating.

 

Can anyone offer any advice on this? Thanks in advance.

3 Replies

  • PlanetEstream , This looks like a doc-bug but however there is sample code which shows the implementation for onSettingUpdate & onQuerySettingUrl. take a look at : https://github.com/OfficeDev/microsoft-teams-sample-complete-node/blob/master/src/Bot.ts

    • PlanetEstream's avatar
      PlanetEstream
      Copper Contributor

      Trinetra-MSFT Hi, thanks for the response, but this assumes I'm using Node and our app is already written in .NET. I cannot find the relevant .NET documentation anywhere online. Do you know if this exists or how I can implement onSettingUpdate and onQuerySettingURL in .NET?

      • Trinetra-MSFT's avatar
        Trinetra-MSFT
        Former Employee

        PlanetEstream , Currently there is no sample code available in C#. I would suggest you to start working with the https://github.com/microsoft/BotBuilder-Samples/tree/master/samples/csharp_dotnetcore/51.teams-messaging-extensions-action, which have more about Message Extension. 

Resources