Swerve
Swerve

Reputation: 48

Microsoft Teams Card Action Launch App Tab instead of opening the page in default browser

I've been trying to develop a Bot using the Microsoft Bot Framework and have had issues finding resources on how to have a button from a MessageCard and/or rich card attachment open my application's tab within the Teams desktop app for Windows 10. I've been referring to the documentation linked from MSDN and would like to know if there are any good examples to follow. Currently the browser is launched when the button is clicked (instead of staying within the app).

The card is simplistic, however, I just need to get past this basic scenario on My Card. Is there way to launch the tab from the Read Article button?

enter image description here

Edit / Additional Information:

The link under the Read Article button is:

https://teams.microsoft.com/l/entity/14ec8cab-b2b7-4596-b358-a1ce962d5c7b/myAppTab?webUrl=https://myappsite.azurewebsites.net&label=News&context={'canvasUrl': 'https://myappsite.azurewebsites.net','channelId': '19:[email protected]'}

The unique identifier represents the application id, the entityId persisted using the setSettings function of the Teams SDK (1.2) from was set to "myAppTab".

Upvotes: 1

Views: 1318

Answers (1)

Wajeed Shaikh
Wajeed Shaikh

Reputation: 3168

Ensure that appId, entityId, entityWebUrl, subEntityWebUrl, entityLabel, subEntityLabel, and context are all URI encoded.

Please check Generating a deep link to your tab documentation.

Note: Added answer from comment for easy access.

Upvotes: 1

Related Questions