MicrosoftDocs / msteams-docs

Source for the Microsoft Teams developer platform documentation.
https://aka.ms/teamsdev
Creative Commons Attribution 4.0 International
284 stars 506 forks source link

Deeplink in msTeams that leads to tab drops subEntityId upon redirection #5892

Closed limar63 closed 2 years ago

limar63 commented 2 years ago

(issue in Web/desktop version of teams) In microsoft teams, our app has deeplink functionality, OpenUrl action inside an adaptive card leads to the application tab. But, despite putting subEntityId inside the context in the link, when I open the tab and ask for a link to that tab ("Copy link to tab" in tab's drop-down menu), the link has null as subEntityId: https://teams.microsoft.com/l/entity/*appid*/*entityId*?context=%7B%22subEntityId%22%3Anull%2C%22channelId%22%3A%22*channelId*%22%7D&groupId=*groupId*&tenantId=*tenantId* The link I am sending inside OpenUrl component looks like this: https://teams.microsoft.com/l/entity/*manifestId*/*entityId*?context={"subEntityId": "*subEntityId*", "channelId": "*channelId*"} that I properly encode, I decoded it here for the easier reading experience. I also tried to add either/both weburl and label, but that didn't work. The subEntityId that I am sending seems to be not received upon opening of the tab. Also, I am using manifestId in the deeplink, but in the link I get from "copy link" inside tab it has different app ID, but it seems to be working fine because it opens up the needed tab. Any idea why the entityId is lost upon the redirection and how to preserve it? I will need to display the certain object according to its id and I need to tab to receive that ID to open the needed form for that object (entity).

ghost commented 2 years ago

Hi limar63! Thank you for bringing this issue to our attention. We will investigate and if we require further information we will reach out in one business day. Please use this link to escalate if you don't get replies.

Best regards, Teams Platform

Prasad-MSFT commented 2 years ago

@limar63 - Could you please confirm in which platform you are facing this issue? Is it MS Teams Desktop/Web or Mobile devices (Android/iOS)?

limar63 commented 2 years ago

@limar63 - Could you please confirm in which platform you are facing this issue? Is it MS Teams Desktop/Web or Mobile devices (Android/iOS)?

Yeah, my bad, will add the platform to the issue description. I am working with Web version and was also double checking it in Desktop app, but most testing and attempts to make it work were done and tested in Web (in browser) to have an access to the chrome developer tools.

aspantel commented 2 years ago

Both, Desktop & Web. Right now we're mainly testing in Web.

aspantel commented 2 years ago

@Prasad-MSFT our tab opens but its link has subEntityId=null:

https://teams.microsoft.com/l/entity/b621f36b-499b-4013-b841-b31fe63aab2c/_djb2_msteams_prefix_1579647393?context=%7B%22subEntityId%22%3Anull%2C%22channelId%22%3A%2219%3A5407f10790084c0db72839eeb3b97a25%40thread.skype%22%7D&groupId=xxxxxxx-9d2f-45bd-90e6-yyyyyyyy&tenantId=xxxxxxxx-1d9f-4105-a4c6-yyyyyyy

sayali-MSFT commented 2 years ago

We tried to repro the issue at our end using below deeplink format and it got redirected to required field/item within the mentioned tab.

microsoftTeams.executeDeepLink("[https://teams.microsoft.com/l/entity/com.microsoft.teamspace.tab.planner/tt.c_19:ac7b9c53a099498f9e08679e58f1f7fc@thread.tacv2_p_bWdTKKitr0q99YObbgIOAGUAAJ71_h_1651123361098?tenantId=36a708ef-700d-4d60-9de0-0a5f7b7693df&webUrl=https%3A%2F%2Ftasks.teams.microsoft.com%2Fteamsui%2FpersonalApp%2Falltasklists&context=%7B%22subEntityId%22%3A%22%2Fboard%2Ftask%2FThKW81OF1EuhY4FWUIvc_mUACem0%22%2C%22channelId%22%3A%2219%3Aac7b9c53a099498f9e08679e58f1f7fc%40thread.tacv2%22%7D");](https://teams.microsoft.com/l/entity/com.microsoft.teamspace.tab.planner/tt.c_19:ac7b9c53a099498f9e08679e58f1f7fc@thread.tacv2_p_bWdTKKitr0q99YObbgIOAGUAAJ71_h_1651123361098?tenantId=36a708ef-700d-4d60-9de0-0a5f7b7693df&webUrl=https%3A%2F%2Ftasks.teams.microsoft.com%2Fteamsui%2FpersonalApp%2Falltasklists&context=%7B%22subEntityId%22%3A%22%2Fboard%2Ftask%2FThKW81OF1EuhY4FWUIvc_mUACem0%22%2C%22channelId%22%3A%2219%3Aac7b9c53a099498f9e08679e58f1f7fc%40thread.tacv2%22%7D%22);)

limar63 commented 2 years ago

@sayali-MSFT upon redirection, what kind of link it produces if you would click the drop down menu in the tab and click "Copy link to tab"? Does the resulting link has "/board/task/ThKW81OF1EuhY4FWUIvc_mUACem0" or it has null for subEntityId? Does the tab link ignores the current specific subEntityId and always gives you the "default" link to it? And if so, is there any way to get a link from an opened tab to the currently opened subentityid page? Or, maybe, it produces the needed link but because our tab doesn't have anything specified for that subentityId specifically, tab drops the subentityId and goes for a default page?

Prasad-MSFT commented 2 years ago

After redirecting if we click on 'Copy link to tab' then we are getting below url https://teams.microsoft.com/l/entity/com.microsoft.teamspace.tab.planner/_djb2_msteams_prefix_144877161?context=%7B%22subEntityId%22%3Anull%2C%22channelId%22%3A%2219%3Aac7b9c53a099498f9e08679e58f1f7fc%40thread.tacv2%22%7D&groupId=1b85f4f3-fa01-46f4-bb62-201225dce9e4&tenantId=36a708ef-700d-4d60-9de0-0a5f7b7693df However upon redirection, its opening required field/task for which subEntityId is declared. image

limar63 commented 2 years ago

Thanks to @Prasad-MSFT help, the issue is solved. The "Copy link to tab" functionality always makes the link to the default tab, dropping any additional info sent to the currently open tab. But in reality, information is not lost and deeplink is working correctly.

ghost commented 2 years ago

Tell us about your experience!

Hi limar63! This issue is closed in our system. We would like your feedback on your experience with our support team and Platform.

Best regards, Teams Platform