Forum Discussion
Link to a personal chat from Task browser
diegoSpace If you are trying to open the link from a web page you could pass it under microsoftTeams.executeDeeplink('yourdeeplink url'); If you want to open it using a card, please try putting a Action.OpenURL which will directly open the chat with the user.
Gousia_BegumThanks for your reply.
If I try to use 'microsoftTeams.executeDeeplink' in the web page displayed in a task I get an error: 'microsoftTeams.executeDeeplink is not a function'. However, 'microsoftTeams.tasks.submitTask();' is working
Do I need to add something to use the 'executeDeeplink'?
- Gousia_BegumMar 06, 2020Microsoft
diegoSpace Could you please confirm if you have included the script for MsTeams in your web page?
"https://unpkg.com/@microsoft/teams-js@1.4.2/dist/MicrosoftTeams.js"After adding this you can use it like:
<script>
microsoftTeams.initialize();
microsoftTeams.executeDeepLink('your Deeplink')
</script>- diegoSpaceMar 09, 2020Brass Contributor
Gousia_Begum I have this:
<script src='https://statics.teams.cdn.office.net/sdk/v1.5.2/js/MicrosoftTeams.min.js'></script>
(but I have also tried now with the link you provided), but the deeplink does not work for me
Below in my page code I have:
<script > microsoftTeams.initialize(); </script>
and in the click event of a button I set:
function onClick() {
alert("click");
microsoftTeams.executeDeeplink('https://teams.microsoft.com/l/chat/0/0?users=bcb3f5ab-7185-4de5-8a70-8279b23a5925');
}But the link does not work. If i paste this link in a channel, it works (private chat is open)
If I use 'microsoftTeams.tasks.submitTask();' it works (event received in my bot), so microsoftTeams API seems to be working...
- Gousia_BegumMar 10, 2020Microsoft
diegoSpace Are you trying to deeplink to a chat with the Bot? Could you please share a video recording of the issue you are seeing?