SSO for Message Extension - OfficeDev/TeamsFx GitHub Wiki
About Message Extension
Message extensions allow the users to interact with your web service through buttons and forms in the Microsoft Teams client. They can search or initiate actions in an external system from the compose message area, the command box, or directly from a message. You can send back the results of that interaction to the Teams client in the form of a richly formatted card.
Function | Scenario | Example |
---|---|---|
Action Commands | You want some external system to do an action and the result of the action to be sent back to your conversation. | Reserve a resource and allow the channel to know the reserved time slot. |
Search Commands | You want to find something in an external system, and share the results with the conversation. | Search for a work item in Azure DevOps, and share it with the group as an Adaptive Card. |
Link Unfurling | You want to complete a complex task involving multiple steps or lots of information in an external system, and share the results with a conversation. | Create a bug in your tracking system based on a Teams message, assign that bug to Bob, and send a card to the conversation thread with the bug's details. |
SSO for Message Extension
There is a MSDN document going to introduce the SSO ability for Message Extension. This artile says that SSO handlers just work for Search Actions
and Link Unfurling
.
According to the mechanism introduced in the article, we have implemented an api handleMessageExtensionQueryWithSSO
in @microsoft/teamsfx
, which can help users realize me's sso more conveniently.
APIs Introduce
API Name | Message Extension Invoke Type | SDK Minimum Version |
---|---|---|
handleMessageExtensionLinkQueryWithSSO | composeExtension/queryLink | 2.3.1-beta.2023110805.0 |
handleMessageExtensionQueryWithSSO | composeExtension/query | 2.0.0 |
API Implement Sample
Please reference this sample code for the basic usage.
API sample link |
---|
handleMessageExtensionLinkQueryWithSSO |
handleMessageExtensionQueryWithSSO |