How to get the subEntityId from deep link on mobile teams client

Sunny Chan 1 Reputation point
2021-07-08T02:51:32.21+00:00

Hi all,

I am trying to get the subEntityId from deep link for the teams app, the teams app is built by spfx framework. It works fine on both web and desktop teams client, however when it comes on the mobile client, it didn't work anymore.

This is the way I get the subEntityId, I am using the teams javaScript client SDK

microsoftTeams.initialize(() => {
      microsoftTeams.getContext((c) => {
        this.setState({ state1: c, location: c.subEntityId });
      });
    });

I have also tried the deep link using https and ms teams protocol, it still not working.

https://teams.microsoft.com/l/entity/d4bec247-9ece-404a-8f4a-16f275def087/tasklist123?webUrl=https://tasklist.example.com/123/456&context={%22subEntityId%22:%20%22detail%22}

msteams://teams.microsoft.com/l/entity/d4bec247-9ece-404a-8f4a-16f275def087/tasklist123?webUrl=https://tasklist.example.com/123/456&context={%22subEntityId%22:%20%22detail%22}

May I know is deep link for subEntityId is not supported on mobile client? If not, any road map we can have this features?

Thanks all for your help

Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
2,840 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sunny Chan 1 Reputation point
    2021-07-09T04:26:30.483+00:00

    Thanks for the prompt reply.

    What we need to do is super simple, just show the subEntityId on the webpart.

    It works fine on the web and desktop client, I can get the "detail" keyword from subEntityId

    113179-untitled.png

    However, when it comes on iOS client, it cannot retrieve the value.

    113135-img-7b52d6dfa3a8-1.jpeg

    I have upload the sppkg and repository for your reference.
    SPPKG: https://twk.pm/ntm9zvbigk
    repository: https://bitbucket.org/ptt-sunnychan/nan-fung-teams-app/src/master/

    I am using Teams iOS client version: 3.10.0