Here are the screenshots:
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello, I've created a new Teams app using the VS Code Teams Toolkit. I want to add a page (a "configurable tab") where the user setting up the tab can enter a URL, which will then become the default URL displayed for everyone who clicks on the tab.
Problem: When I start the app, I see a "Set up a tab" button, but I don't get the configuration page. However, I can manually access it via https://localhost:53000/config
.
Screenshots: https://ibb.co/YfKNj6X https://ibb.co/5Ft95N1
I'm expecting the configuration page to appear when the app is initially added to the tab, like in this example YouTube video, but I can't get it to show. What can I do to see the configuration page when I'm adding the tab?
Here are the configurations:
Manifest JSON:
"configurableTabs": [
{
"configurationUrl": "${{TAB_ENDPOINT}}/config",
"canUpdateConfiguration": true,
"scopes": ["team", "groupChat"]
}
],
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": [
"${{TAB_DOMAIN}}"
]
App Configuration (app.ts):
server.get("/", (req, res, next) => {
send(req, __dirname + "/views/hello.html").pipe(res);
});
// Static Tab Setup
server.get("/tab", (req, res, next) => {
send(req, __dirname + "/views/hello.html").pipe(res);
});
server.get("/config", (req, res, next) => {
send(req, __dirname + "/views/config.html").pipe(res);
});
Configuration Page (config.html):
<!DOCTYPE html>
<html lang="en">
<head>
<title>Configuration</title>
<script
src="https://res.cdn.office.net/teams-js/2.22.0/js/MicrosoftTeams.min.js"
integrity="sha384-WSG/sWulIv7rel5TnFlH8JTpxl2OxzZh9Lux2mIzBFiTRLFvMBeFv9VURu/3vQdx"
crossorigin="anonymous"
></script>
<script src="/static/scripts/teamsapp.js"></script>
</head>
<body>
<h2>Configure Your Tab</h2>
<label for="url">Enter URL:</label>
<input type="text" id="url" placeholder="https://example.com">
<button onclick="save()">Save</button>
<script>
microsoftTeams.initialize();
function save() {
const url = document.getElementById("url").value;
microsoftTeams.settings.setSettings({
contentUrl: url,
websiteUrl: url,
suggestedDisplayName: "My Teams Tab"
});
microsoftTeams.settings.setValidityState(true);
microsoftTeams.settings.saveEvent.notifySuccess();
}
</script>
</body>
</html>
Here are the screenshots:
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more
Here's what I see in the dekstop app when I added the zip package