question

Serban avatar image
0 Votes"
Serban asked HunaidHanfee-MSFT answered

How can I create configurable properties for a custom Teams message extension ?

I need some kind of configurable custom properties for the teams message extension that I developed.

Something that can be configured, preferably in some kind of "Settings section"; the kind of property that the regular users should not have to manually type every time they use the message extension, but instead access it somehow, and which periodically might need to be changed (without any azure (re)deployment operations).

What options do I have ?

Thank you.

office-teams-app-dev
· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello ,
I am looking for the ways, but have you tried the sample - teams-messaging-extension-search-auth-config.
In this sample you can configure the Messaging extension by right clicking on it and selecting settings from the menu.
![133659-image.png][2]


Thanks


0 Votes 0 ·
image.png (3.9 KiB)
Serban avatar image Serban HunaidHanfee-MSFT ·

I I tried that sample, I was able to get it to work eventually.
What I got was a pop-up launching externally and loading the content of that "settings.html" file.

Now I need help with subsequent issues...

  • could I return & work with an adaptive card, instead of loading an URL ?

  • what possibilities do I have to really persist some of the data set by the user in the settings section ? So that it has effect on the functionality of the message extension at further invocations ? I need something similar to the way a custom Teams Tab can have configurable properties...

Thanks.





0 Votes 0 ·

It's good to hear that it worked.

could I return & work with an adaptive card, instead of loading an URL ?

I don't think it is possible, I have checked for samples but I didn't find any. I will confirm you on this point after confirming internally.

what possibilities do I have to really persist some of the data set by the user in the settings section ? So that it has effect on the functionality of the message extension at further invocations ? I need something similar to the way a custom Teams Tab can have configurable properties...

As I understand your question, Once the user sets the configuration it should persists for that user even after signing out and if its appDomain didn't changes. Doing it with tab isn't possible.





0 Votes 0 ·
Show more comments

1 Answer

HunaidHanfee-MSFT avatar image
1 Vote"
HunaidHanfee-MSFT answered

Hello ,
In this sample you can configure the Messaging extension by right clicking on it and selecting settings from the menu.
134346-image.png

could I return & work with an adaptive card, instead of loading an URL ?

No, this is not possible. You need to do it with URL only.

what possibilities do I have to really persist some of the data set by the user in the settings section ? So that it has effect on the functionality of the message extension at further invocations ? I need something similar to the way a custom Teams Tab can have configurable properties...

See this - Save user and conversation data to learn more how the user configuration is maintained in the sample.


Thanks,
Hunaid Hanfee



If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.




image.png (3.9 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.