Skip to content

Instantly share code, notes, and snippets.

@Ge-lx
Last active February 14, 2019 13:19
Show Gist options
  • Save Ge-lx/3cc8dffcac77e08e7accef2ca0172286 to your computer and use it in GitHub Desktop.
Save Ge-lx/3cc8dffcac77e08e7accef2ca0172286 to your computer and use it in GitHub Desktop.
Teams connector configuration issue
On my configuration page (https://c878f667.ngrok.io/msteams/connector-landing)
I am registering an onSaveEvent handler, that should save the configuration like this:
-------------------------------------------------------------
var mysettings = {
entityId: webhook.id,
configName: configName,
contentUrl: LANDING_PAGE_PATH,
removeUrl: LANDING_PAGE_PATH
};
teamsSdk.initialize();
teamsSdk.settings.registerOnSaveHandler(function(saveEvent) {
teamsSdk.settings.setSettings(mysettings);
// This gets executed. I checked
saveEvent.notifySuccess();
});
----------------------------------------------------------------
This fails with the following message:
Received error from connectors: {
"seq":1550133560094,
"timestamp":1550148789111,
"flightSettings":{
"Name":"ConnectorFrontEndSettings",
"AriaSDKToken":"d127f72a3abd41c9b9dd94faca947689-d58285e6-3a68-4cab-a458-37b9d9761d35-7033",
"SPAEnabled":true,
"ClassificationFilterEnabled":true,
"ClientRoutingEnabled":true,
"EnableYammerGroupOption":true,
"EnableFadeMessage":false,
"EnableDomainBasedOwaConnectorList":false,
"EnableDomainBasedTeamsConnectorList":false,
"DevPortalSPAEnabled":true,
"ShowHomeNavigationButtonOnConfigurationPage":false
},
"status":500,
"clientType":"SkypeSpaces",
"connectorType":"45302fba-8ce9-432d-a6c0-807e08ac8cbd",
"name":"handleMessageError",
"nonPIIInfo":"{\"exception\":{}}"
}
---------------------------------------------------------------
After some digging I found:
The configuration sent to the connector API (take from REST):
It seems to me that the required validDomain is not passed to Teams despite being configured in the connector dashbaord.
{
"ProviderId":"45302fba-8ce9-432d-a6c0-807e08ac8cbd",
"ImageContent":"data:image/jpg;base64,....",
"IsDesktopClient":false,
"ValidDomains":";https://teams.microsoft.com;https://teams.microsoft.us;https://int.teams.microsoft.com;https://devspaces.skype.com;https://ssauth.skype.com;https://www.merlot.city;https://www.merlot.life",
"ConfigurationContentUrl":null,
"ConfigurationUrl":"https://c878f667.ngrok.io/msteams/connector-landing",
"EntityId":null,
"AppType":"Teams",
"UserObjectId":"6ff32f78-ce1c-4ec2-907d-3f760bddbe60",
"WebhookUrl":"https://outlook.office.com/webhook/c9cc87d6-ca9b-4c2f-8bf5-5a2ac9128e1b@d46622ad-f7da-4786-ae59-bd9ac5ae5da8/45302fba-8ce9-432d-a6c0-807e08ac8cbd/045bc96820ef47229b80f264a5b0bf69/6ff32f78-ce1c-4ec2-907d-3f760bddbe60",
"FriendlyName":null,
"IsCreateFlow":false,
"AlternateId":"045bc96820ef47229b80f264a5b0bf69",
"ProviderName":"ConnectToO365Inline",
"ProviderDisplayName":"New Connector",
"IsNewProfile":true,
"IsIncomingWebhookType":false,
"ConnectorConfigurationId":null,
"IsConnectedAccountsSupported":false,
"ChooseAccountDescription":"Choose the New Connector account you want to use to configure this connector, or add a new account.",
"ConnectorDetailedDescription":"Different tools suit different tasks, just like different people feel comfortable with different tools. Whether you\u0027re scheduling meetings, tracking your project\u0027s progress, brainstorming new design ideas, or crunching numbers, there\u0027s a view for you.",
"ForwardToEmail":"c9cc87d6-ca9b-4c2f-8bf5-5a2ac9128e1b@d46622ad-f7da-4786-ae59-bd9ac5ae5da8",
"ForwardToFullQualifiedObjectId":"c9cc87d6-ca9b-4c2f-8bf5-5a2ac9128e1b@d46622ad-f7da-4786-ae59-bd9ac5ae5da8",
"GroupName":"Unbroken Team",
"IsOwnerOfConfiguration":true,
"IsConfigurationInBadState":false,
"NeedToRecreate":false,
"UserConnectedAccounts":[],
"SelectedConnectedAccount":null,
"SelectedConnectedAccountId":null,
"ConnectorConfiguration":null,
"ServiceAccountName":null,
"ServiceAccountUniqueId":null,
"SelectedChannelId":"19:47233c2a202d4349b00a14c789e7521b@thread.skype",
"ClientType":"SkypeSpaces",
"ErrorMessage":null,
"ObservedProperties":null,
"FrequencyList":[ ... ],
"Screenshots":null,
"PopupNeededForConsentPageInOlk":false,
"OrgPrivacyPolicyUrl":"https://go.microsoft.com/fwlink/?LinkId=512132"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment