settings.getSettings() callback is not invoked on connector save

188 views Asked by At

I have a connector configuration page set up to create a sample connector. It looks like I can successfully save the connector, but I'm unable to retrieve the generated webhook URL. Here's a sample of the code:

const getSettingsHandler = (settings) => {
  document.getElementById("url").innerText = settings.webhookUrl;
};

const saveHandler = (event) => {

  microsoftTeams.settings.setSettings(settings);
  microsoftTeams.settings.getSettings(getSettingsHandler);
  event.notifySuccess();

};

Yet, I don't see the URL printed to the screen. It seems like getSettingsHandler() is not being invoked as expected. I thought maybe the issue was that the config screen closes immediately after calling event.notifySuccess(), before the callback is invoked. But all of the examples I've looked at use this pattern, including an official Teams project here. Why isn't this callback being invoked?

0

There are 0 answers