Context:
I try to write a simple Microsoft Teams tab that displays a feed list. I'm able to side load my tab to Teams and to select it from the Channel "+" menu.
Problem:
If I want to save my settings, an error text appears that says "We couldn't save your tab settings. Please try again." There is no error in my browser's javascript error console.
My config.html tab javascript code:
<script type="text/javascript">
microsoftTeams.initialize();
microsoftTeams.settings.registerOnSaveHandler(function (saveEvent) {
microsoftTeams.settings.setSettings({
entityId: "example",
contentUrl: ".html",
suggestedDisplayName: "example",
websiteUrl: "",
removeUrl: ".html"
});
saveEvent.notifySuccess();
});
function onClick()
{
microsoftTeams.settings.setValidityState(true);
}
</script>
My manifest.json
{
"$schema": ".4/manifest/MicrosoftTeams.schema.json",
"manifestVersion": "0.4",
"id": "ee90834a-d649-458d-a4e2-0b0f8d425c11",
"version": "1.0",
"name": "WINSider Community Deutschland",
"developer": {
"name": "WINSider Community Deutschland",
"websiteUrl": "",
"privacyUrl": "/",
"termsOfUseUrl": "/"
},
"tabs" : [{
"id": "ee90834a-d649-458d-a4e2-0b0f8d425c11",
"name": "WINSider Community",
"description" : {
"short": "WINsider article list as a tab",
"full": "Summarizes the windowsmunity.de blog posts as a clickable list."
},
"icons": {
"44": "icon44.png",
"88": "icon88.png"
},
"accentColor" : "#37A3CF",
"configUrl": ".html",
"canUpdateConfig": true
}],
"needsIdentity": false,
"validDomains": [
"*.github.io",
"*.github",
"*.googleapis",
"*.microsoft",
"*.rss2json",
"*windowsmunity.de"
]
}
Context:
I try to write a simple Microsoft Teams tab that displays a feed list. I'm able to side load my tab to Teams and to select it from the Channel "+" menu.
Problem:
If I want to save my settings, an error text appears that says "We couldn't save your tab settings. Please try again." There is no error in my browser's javascript error console.
My config.html tab javascript code:
<script type="text/javascript">
microsoftTeams.initialize();
microsoftTeams.settings.registerOnSaveHandler(function (saveEvent) {
microsoftTeams.settings.setSettings({
entityId: "example",
contentUrl: "https://example./tab.html",
suggestedDisplayName: "example",
websiteUrl: "https://example.",
removeUrl: "https://example./remove.html"
});
saveEvent.notifySuccess();
});
function onClick()
{
microsoftTeams.settings.setValidityState(true);
}
</script>
My manifest.json
{
"$schema": "https://statics.teams.microsoft./sdk/v0.4/manifest/MicrosoftTeams.schema.json",
"manifestVersion": "0.4",
"id": "ee90834a-d649-458d-a4e2-0b0f8d425c11",
"version": "1.0",
"name": "WINSider Community Deutschland",
"developer": {
"name": "WINSider Community Deutschland",
"websiteUrl": "https://windowsmunity.de",
"privacyUrl": "https://windowsmunity.de/de/impressum/",
"termsOfUseUrl": "http://windowsmunity.de/de/impressum/"
},
"tabs" : [{
"id": "ee90834a-d649-458d-a4e2-0b0f8d425c11",
"name": "WINSider Community",
"description" : {
"short": "WINsider article list as a tab",
"full": "Summarizes the windowsmunity.de blog posts as a clickable list."
},
"icons": {
"44": "icon44.png",
"88": "icon88.png"
},
"accentColor" : "#37A3CF",
"configUrl": "https://tscholze.github.io/public/teamstab/config.html",
"canUpdateConfig": true
}],
"needsIdentity": false,
"validDomains": [
"*.github.io",
"*.github.",
"*.googleapis.",
"*.microsoft.",
"*.rss2json.",
"*windowsmunity.de"
]
}
Share
Improve this question
edited Apr 21, 2017 at 6:46
Tobonaut
asked Apr 5, 2017 at 18:15
TobonautTobonaut
2,4834 gold badges28 silver badges43 bronze badges
2 Answers
Reset to default 4It looks like your contentUrl
, websiteUrl
, and removeUrl
are using domains not in your validDomains
list. This will cause the save to fail.
For your information
David posted the answers as a ment to my Github issue. Thank you.
Long story short
*example
to allow domain calls like http://example
and http://www.example
is not a valid definition oaf a validDomain
.