2
votes

I tried to deep link a Microsoft Teams static Tab containing an iframe.

The link to the tab works but I want to change the iframe based on the deep link. Which is possible with the use of task modules, since task modules use https://teams.microsoft.com/l/task/<APP_ID>**?url=<TaskInfo.url>**&height=<TaskInfo.height>&width=<TaskInfo.width>&title=<TaskInfo.title> Which can be found here.

while deep links to tabs use https://teams.microsoft.com/l/entity/<appId>/<entityId>?webUrl=<entityWebUrl>&label=<entityLabel>&context=<context>

I know about the official documentation for deep links in teams.

But I can't manage to achieve the same with the iframe as with the task module. Is this even possible?

1

1 Answers

3
votes

It is possible, but basically you need some code your side to intercept what's coming in from Teams, and directing/setting the iframe src appropriately. For instance, on the deeplink, you can set the "subEntityId", which you could use to indicate which page you want to show in your frame. You'd need to query the Teams js context in your "container" page, in that case, and set the src of the iframe to the respective destination. You would be accessing context.subEntityId. It's possible to do this using the querystring options as well, I think. See here for more.