OfficeDev / microsoft-teams-library-js

JavaScript library for use by Microsoft Teams apps
https://docs.microsoft.com/microsoftteams/platform/
Other
429 stars 197 forks source link

Deep link does not work in new Teams #1900

Closed tjosepo closed 1 year ago

tjosepo commented 1 year ago

Hi 👋

Our custom Teams App is using deep links to navigate users to sub-pages inside the iframe of our application.

Our deep links look like this:

https://teams.microsoft.com/l/entity/<app_id>/home?context={"subEntityId": "url=/subpage?id=12345"}

The URL is shown in plaintext for clarity. The real one we use is URL encoded properly.

This works on web Teams and old Teams, but not on new Teams where we get this message:

image

It's unclear when this feature will be supported in new Teams or if there's an existing alternative.

As per the documentation, I tried using this library to generate a deep link:

teams.pages.shareDeepLink({ subPageId: "url=/subpage?id=12345" })

Unfortunately, the generated link was completely broken. It didn't open the app. Instead, if just opened the "Chat" tab at the first conversation.

The generated link looked like this:

https://teams.microsoft.com/l/entity/<app_id>/_djb2_msteams_prefix_2479942178?label=Home&context={
++"subEntityId":+"url=/approvals?id=12345",
++"chatId":+"<chat_id>",
++"contextType":+"chat"
}&tenantId=<tenant_id>

Questions:

Deep links are quite important for an upcoming feature of our apps, so we would like to find an alternative for new Teams.

On a side note, the type definitions for the teams.pages module did not have any Intelliscene in VS Code. Do I need a specific setup for them to work properly? Edit: Just needed to restart VS Code with fewer background processes.

Thank you for you time. 🙇

Let me know if you need more information.

microsoft-github-policy-service[bot] commented 1 year ago

Hi tjosepo! 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

Meghana-MSFT commented 1 year ago

Thank you for reporting this, we will check this and get back to you.

ChetanSharma-msft commented 1 year ago

Hello @tjosepo - Sorry for delay in response. We are looking into it and let you know the updates soon.

ChetanSharma-msft commented 1 year ago

Hello @tjosepo - Sorry for delay in response. We are actively checking this with engineering team and let you know the updates.

Meghana-MSFT commented 1 year ago

@tjosepo - Apologies for the delay, bug has been already raised for this issue. We are following up with the team. We will keep you posted on the updates. Thank you.

Meghana-MSFT commented 1 year ago

@tjosepo - Could you please share the exact URL with encoded parameters and test credentials where the issue is reproduced. Engineering team needs these details to find the root cause of the issue. Please share these details at microsoftteamsdev@microsoft.com.

tjosepo commented 1 year ago

I just tried it again, and it seems like deep links are now being supported in new Teams.

That solves my problem,, so I will close this issue.

Thank you for your time 🙇

microsoft-github-policy-service[bot] commented 1 year ago

Tell us about your experience!

Hi tjosepo! We have closed this issue in our system, but we would love to hear your feedback. To let us know how we did, simply use one of the following emoji icons: :thumbsup: for resolved, :thumbsdown: for unresolved, or :heart: for a great experience on this message. Please use the link for more detailed feedback.

Best regards, Teams Platform