0

I have encountered an issue while trying to create a deep link for my Microsoft Teams tab. My tab opens a web app built with Angular, which consists of a homepage and multiple internal pages. Specifically, I am having trouble creating a link that will open a particular route ('/article/1414') within the personal tab.

I have attempted to create the deep link using the following format:

The personal tab will open (home page). However, I have not been successful in getting the link to navigate to the specified route (/article/{articleId}).

When creating the link, I have set the following parameters:

https://teams.microsoft.com/l/entity/<appId>/<entityId>?webUrl=<entityWebUrl>&label=<entityLabel>

entityWebUrl: https://site.web.com/article/1414 label: Article entityId: I am using the personal tab entityId from the manifest. I am seeking advice on whether this is the correct way to create a deep link for my Teams tab. Any insights or suggestions would be greatly appreciated.

Thank you in advance.

Vinny P.
  • 21
  • 9

2 Answers2

1

It's not possible to deep link to a sub page in your app directly like this, but it's possible to do what you're trying to do overall in general, just in a different way. webUrl won't work because that's only a fallback for scenarios when Teams can't open the deep link directly, like on certain devices - it's not even getting used in your scenario.

Instead, look to use a one or more of the context or other parameters options built for this. For instance, you can use context.subEntityId to hold "article" and "1414" or entityLabel or subEntityLabel to hold "article" and context.subEntityId to hold "1414", and then you'd need to handle the rendering of that in your angular app appropriately (e.g. have a page specifically to deal with this incoming scenario, or do a redirect internally, or something like that.

Hilton Giesenow
  • 9,809
  • 2
  • 10
  • 24
0

I ended up adding the following to make it work:

let encodedContext = encodeURIComponent(JSON.stringify({"subEntityId": "article/4141"}));
var taskItemUrl = 'https://teams.microsoft.com/l/entity/fe4a8eba-2a31-4737-8e33-e5fae6fee194/tasklist123?context=' + encodedContext;

Then adding a redirect guard to check for context.page.id within context data.

Vinny P.
  • 21
  • 9