SOLVED

Add a Teams 'configurableTab': 'Save' button disabled

Brass Contributor

Hi,

I am trying to add a tab to a Teams channel but my 'Save' button is always disabled.
I have used the 'configuration page example' from https://docs.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/create-tab-pages/configuration-....

'websiteUrl' & 'contentUrl' are valid (open in a browser), in fact 'contentUrl' is used to show content in a static (personal) tab.

'microsoftTeams.settings.setValidityState(true)' is called:

...
let saveRed = () => {
microsoftTeams.settings.registerOnSaveHandler((saveEvent) => {
microsoftTeams.settings.setSettings({
websiteUrl: "https://myCompany.com",
contentUrl: "https://myWebserver/content.html",
entityId: "redIconTab",
suggestedDisplayName: "MyNewTab"
});
saveEvent.notifySuccess();
});
}
...
const colorClickRed = () => {
rd.display = "block";
gr.display = "none";
microsoftTeams.settings.setValidityState(true);
saveRed();
}

What could it be my problem?

Thanks in advance,
Diego

1 Reply
best response confirmed by diegoSpace (Brass Contributor)
Solution

I have it, I explain just in case it could help to anyone...

 

First I got 'Save' button enabled, i think microsoftTeams.settings.setValidityState(true) was not being called...

Then I got an error ('We couldn't save your tab settings"), and it was because my 'websiteUrl' was not added in the 'validDomins' list (app manifest). To find this problem I used the browser Teams version and F12 when I got the error to see the problem was in websiteUrl.

 

1 best response

Accepted Solutions
best response confirmed by diegoSpace (Brass Contributor)
Solution

I have it, I explain just in case it could help to anyone...

 

First I got 'Save' button enabled, i think microsoftTeams.settings.setValidityState(true) was not being called...

Then I got an error ('We couldn't save your tab settings"), and it was because my 'websiteUrl' was not added in the 'validDomins' list (app manifest). To find this problem I used the browser Teams version and F12 when I got the error to see the problem was in websiteUrl.

 

View solution in original post