Forum Discussion
How to launch a link in Teams Tab or Popup?
Hi,
Currently when a user clicks on a hyperlink in chat, user will be redirected to external browser to launch the link. I have a requirement to launch the link within Teams (in a tab or pop up or any other way). Is there a way to achieve this?
- Sayali-MSFTMicrosoft
Karunakaran_GN - Thanks for reporting your issue.
Could you please elaborate on your requirement?
1.Are you using the deeplink to open tab/Task module?
2.are using any normal website URL?
Please refer the sample and confirm once , are you looking for the same?
Microsoft-Teams-Samples/samples/app-task-module/csharp at main · OfficeDev/Microsoft-Teams-Samples (github.com)- Karunakaran_GNCopper Contributor
Thanks Sayali for the response!!
My requirement is, I have 2 buttons in my adaptive card. On clicking fisrt button https://abc.com site should be launched and on clicking second button https://xyz.com should be launched. With in teams, either in a tab or modal window(or if there is any better way). Currently on button click the URL is being launched in external browser.
I am able to add a personal tab to my application and create deeplink tot he same, on click of deeplink focus is being shifted to the tab but the problem is URL in personal tab is static, I want it to be dynamic such that on runtime I can pass the URL to be launched in the tab.- Sayali-MSFTMicrosoft
Karunakaran_GN -Please have look into this sample-
Microsoft-Teams-Samples/DeepLinkBot.cs at main · OfficeDev/Microsoft-Teams-Samples (github.com)public Attachment AdaptiveDeepLinkCard(string userName, ITurnContext turnContext) { if (turnContext.Activity.Conversation.ConversationType == "channel") { channelID = turnContext.Activity.Conversation.Id.Split(';')[0]; tabUrlTask1 = deeplinkHelper.GetDeepLinkToChannelTask(teamsUrl, _configuration["MicrosoftAppId"], _configuration["BaseURL"], channelID, _configuration["ChannelEntityId"], "bot1"); tabUrlTask2 = deeplinkHelper.GetDeepLinkToChannelTask(teamsUrl, _configuration["MicrosoftAppId"], _configuration["BaseURL"], channelID, _configuration["ChannelEntityId"], "bot2"); tabUrlTask3 = deeplinkHelper.GetDeepLinkToChannelTask(teamsUrl, _configuration["MicrosoftAppId"], _configuration["BaseURL"], channelID, _configuration["ChannelEntityId"], "bot3"); extendedDeepLink = deeplinkHelper.GetDeepLinkToChannelTask(teamsUrl, _configuration["MicrosoftAppId"], _configuration["BaseURL"], channelID, _configuration["ChannelEntityId"], ""); } else { tabUrlTask1 = deeplinkHelper.GetDeepLinkToTabTask(teamsUrl, _configuration["ManifestAppId"], _configuration["TabEntityId"], "topic1"); tabUrlTask2 = deeplinkHelper.GetDeepLinkToTabTask(teamsUrl, _configuration["ManifestAppId"], _configuration["TabEntityId"], "topic2"); tabUrlTask3 = deeplinkHelper.GetDeepLinkToTabTask(teamsUrl, _configuration["ManifestAppId"], _configuration["TabEntityId"], "topic3"); extendedDeepLink = deeplinkHelper.GetDeepLinkToTabTask(teamsUrl, _configuration["ManifestAppId"], _configuration["TabEntityId"], ""); }
- ccv_oCopper ContributorHi! Were you able to figure this out? I have this same task currently