Forum Discussion
Inconsistent Behavior with Teams Deep Link Across Access Methods
Hello,
I'm working on an application that uses the deep link feature in Microsoft Teams.
I've encountered an issue where the deep link doesn't work when manually opened in a new browser tab. However, when I click the same link directly (for example, when a colleague shares it and I click it), it works as expected.
I'm attaching a few supporting files, including a log file captured during the failed deep link attempt, to help demonstrate the issue.
Deep link not working (opened manually in new tab):
https://jam.dev/c/4d84c468-54de-4017-a3a1-a1a0e267b00d
Deep link working (clicked directly):
https://jam.dev/c/b9b463a5-f177-44fe-8f19-f2cc3c2a5c7d
Log:
https://drive.google.com/file/d/1BKkraSXXl_QVuWGcJAYFu9kOlNyrsjCa/view?usp=sharing
Has anyone experienced similar behavior or have any ideas about what might be causing this?
Thank you in advance!
1 Reply
The issue with your Microsoft Teams deep link not working when manually opened in a new browser tab is likely due to missing authentication or session context. When a user clicks the link directly (e.g., from an email or within Teams), their current session and cookies are preserved, allowing the deep link to resolve correctly. However, manually pasting the link into a new tab often lacks that context, leading to unexpected behavior or failure to load.
To avoid this, use the official Teams deep link format (https://teams.microsoft.com/l/entity/...) which is more reliable across access methods. Ensure users are signed into Teams before using the link, and whenever possible, encourage them to click the link rather than copy/paste it. If your app uses tabs or custom pages, make sure it handles Teams initialization and context retrieval via the Microsoft Teams JavaScript SDK (microsoftTeams.initialize() and getContext()). For a more advanced solution, consider redirecting users through an intermediate page that checks for a valid Teams session before opening the deep link.
------------------------------------
Don't forget to mark as solution if my answer suits you