Forum Discussion
diegoSpace
Feb 26, 2020Brass Contributor
Link to a personal chat from Task browser
Hi, I have a bot with commands and messaging extensions. When I send a card from the Bot as a response for a command received from Teams, I can add a link to the personal chat of the user who se...
Gousia_Begum
Microsoft
Mar 06, 2020diegoSpace 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>
diegoSpace
Mar 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, 2020
Microsoft
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?
- diegoSpaceMar 10, 2020Brass Contributor
Gousia_Begum I can not record, but please see my images, which show the problem. In my task I have a page with the link, and when I press it I would like Teams goes to personal channel.
Maybe I could close the dialog with a 'submitTask()', and open the personal chat from bot code. But is it possible?
- Gousia_BegumMar 27, 2020
Microsoft
diegoSpace Do you have this link inside microsoftTeams.executedeeplink()?