Feb 13 2024 07:31 AM
I've built a teams tab app and have a requirement of being able to click on a link and load an external website within the teams environment, and not in an external browser. This could either be in an embedded browser pop-up window or in a teams tab. Did some research and found it could be possible using deeplinks. This is what I have so far to test it out:
import { app } from "@microsoft/teams-js";
const openExternalLink = () => {
app.openLink({
deepLink: `https://teams.microsoft.com/l/entity{TeamsAppId}/{TeamsTabId}?msLaunch=true&enableMobilePage=true&suppressPrompt=true&webUrl=google.com`
// an alternative deeplink format
// deepLink: 'https://google.com/',
});
};
Is there a more appropriate way to open the webpage in a pop-up or tab?
I keep getting errors when I run the code above.
The main error I get is: "TypeError: Failed to construct 'URL': Invalid URL"
I would appreciate any help.
Feb 13 2024 09:57 PM
Feb 14 2024 03:56 AM
@ccv_o - Please refer the below points.