Microsoft Teams Connector unable to save configuration - microsoft-teams

I'm trying to build a Microsoft Teams connector that I have sideloaded into my team while developing. I've set up a testing config page on S3 and have pointed my app manifest to it. When I click the save button, it stays stuck on the "Setting up your connector" spinner for a while, before saying "Unable to save connector configuration. Please try again."
The Javascript of the config page should be visible through the S3 link above; my app manifest is below. After looking at a few similar questions, you'll note that the contentUrl is included by wildcard in validDomains.
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.7/MicrosoftTeams.schema.json",
"manifestVersion": "1.7",
"version": "1.0.0",
"id": "0b73c39a-db1d-43eb-81bd-3813bef33713",
"packageName": "<redacted>",
"developer": {
"name": "Developer",
"websiteUrl": "<redacted>",
"privacyUrl": "<redacted>",
"termsOfUseUrl": "<redacted>"
},
"icons": {
"color": "color.png",
"outline": "outline.png"
},
"name": {
"short": "Test",
"full": "Test"
},
"description": {
"short": "Test notifications",
"full": "Test notifications"
},
"accentColor": "#FFFFFF",
"connectors": [
{
"connectorId": "0b73c39a-db1d-43eb-81bd-3813bef33713",
"configurationUrl": "https://wsk-teams-test.s3.amazonaws.com/teams_configure.html",
"scopes": [
"team"
]
}
],
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": [
"wsk-teams-test.s3.amazonaws.com",
"<redacted>"
]
}
I'm not able to get any more detailed information when attempting this via the desktop Teams app, but in the browser I see this error in the console:
2020-09-02T23:05:20.879Z Received error from connectors {"seq":1599086774636,"timestamp":1599087920857,"flightSettings":{"Name":"ConnectorFrontEndSettings","AriaSDKToken":"<redacted>","SPAEnabled":true,"ClassificationFilterEnabled":true,"ClientRoutingEnabled":true,"EnableYammerGroupOption":true,"EnableFadeMessage":false,"EnableDomainBasedOwaConnectorList":false,"EnableDomainBasedTeamsConnectorList":false,"DevPortalSPAEnabled":true,"ShowHomeNavigationButtonOnConfigurationPage":false,"DisableConnectToO365InlineDeleteFeedbackPage":true},"status":500,"clientType":"SkypeSpaces","connectorType":"0b73c39a-db1d-43eb-81bd-3813bef33713","name":"handleMessageError"}
Thanks for any guidance you might have. If I can get in touch with someone from Microsoft privately, I'd be happy to provide the <redacted> information.

This issue is fixed by adding the content url in valid domains list in the Connector Developer Dashboard.

As recommended above: This issue is fixed by adding the content url in a valid domains list in the Connector Developer Dashboard.
This helped me understand the direction of the problem.
But my accidental mistake was due to the lack of the prefix https://
Be sure to add https:// prefix to your domain

Related

MS Teams Bot - task/fetch URL not loading in web/desktop app but loading in android app

I'm trying to display an URL upon invoke (task/fetch) via MS Teams bot. The URL is loading and working perfectly fine on android/ios app. But it is not loading at all in web/desktop app. The app has been in production for some time now and I recently updated the app manifest with valid domains for making the URLs load in Teams.
Also I tried the same manifest/backend with another test app and URLs are loading fine in web/mobile app. Not sure what am I missing here.
Please find below my task/fetch response and manifest details.
task/fetch response
{
"task": {
"type": "continue",
"value": {
"title": "Task Module Test",
"height": 1200,
"width": 1000,
"url": "https://www.contoso.com/msteams/taskmodules/newcustomer",
"fallbackUrl": "https://www.contoso.com/msteams/taskmodules/newcustomer"
}
}
}
My App Manifest (have edited some sensitive info but the structure of the manifest is intact)
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.8/MicrosoftTeams.schema.json",
"manifestVersion": "1.8",
"version": "1.0.0",
"showLoadingIndicator": true,
"id": "some-id",
"packageName": "com.example.bots.msteams",
"developer": {
"name": "Test",
"websiteUrl": "https://www.example.com",
"privacyUrl": "https://www.example.com/policy",
"termsOfUseUrl": "https://www.example.com/terms"
},
"icons": {
"color": "color.png",
"outline": "outline.png"
},
"name": {
"short": "Test Short",
"full": "Test Long"
},
"description": {
"short": "Short desc",
"full": "Long desc"
},
"accentColor": "#FFFFFF",
"bots": [
{
"botId": "some-id",
"scopes": [
"personal"
],
"supportsFiles": true,
"isNotificationOnly": false
}
],
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": [
"www.contoso.com"
]
}
URL successfully loading on Phone app
URL not loading on web/desktop app
Happy to provide any other info if needed!
Ok, found the fix (but I have no clue why it works). I removed showLoadingIndicator property from the manifest and the URLs are loading fine now.
I couldn't find much help on what that property does from MS docs.
Glad that you found the solution and thanks for posting it back to help other community members.
When you set showLoadingIndicator to true, as a mandatory step you need to call microsoftTeams.appInitialization.notifySuccess() to notify Teams that your app has successfully loaded.
The behavior on mobile clients is not configurable through the native loading indicator property. Mobile clients show this indicator by default across content pages and iframe-based task modules.
Here is documentation on Show Loading Indicator.

Microsoft Teams - Custom App, can't load Webpage/2nd Tab

I am creating a Custom Teams App, that simply loads a few webpages:
https://www.itcompany.co.nz
https://itcompany.itclientportal.com/ClientPortal/Login.aspx
Note: ITCOMPANY is just a placeholder so I could create this post publically, I can get it to load the itcompany.co.nz , but all I get is a blank screen when attempting to navigate to the 2nd tab (https://itcompany.itclientportal.com/ClientPortal/Login.aspx).
Note: the ClientPortal is just a login screen, there is no SSO etc.
Not sure what I am doing wrong here, hoping I can get some assistance on what I could be missing.
Note: If I change the URL to: https://www.google.co.nz, it does the same thing (doesn't load). refused to connect error, these URLs were added automatically to the allowed domains list by App Studio.
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.8/MicrosoftTeams.schema.json",
"manifestVersion": "1.8",
"version": "1.0.0",
"id": "05db8546-1517-4306-8dda-7278e8272226",
"packageName": "com.microsoft.teams.m365lp",
"developer": {
"name": "IT Company Limited",
"websiteUrl": "https://www.itcompany.co.nz",
"privacyUrl": "https://www.itcompany.co.nz",
"termsOfUseUrl": "https://www.itcompany.co.nz",
"mpnId": "CA01101011"
},
"icons": {
"color": "color.png",
"outline": "outline.png"
},
"name": {
"short": "IT COMPANY",
"full": "At IT COMPANY, we solve your IT problems!"
},
"description": {
"short": "IT COMPANY",
"full": "At IT COMPANY, we solve your IT problems!"
},
"accentColor": "#8B8B8B",
"staticTabs": [
{
"entityId": "201911011330",
"name": "IT COMPANY",
"contentUrl": "https://www.itcompany.co.nz/",
"websiteUrl": "https://www.itcompany.co.nz/",
"scopes": [
"personal"
]
},
{
"entityId": "201911011335",
"name": "IT COMPANY Support Portal",
"contentUrl": "https://itcompany.itclientportal.com/ClientPortal/Login.aspx",
"websiteUrl": "https://itcompany.itclientportal.com/ClientPortal/Login.aspx",
"scopes": [
"personal"
]
}
],
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": [
"www.itcompany.co.nz",
"itcompany.itclientportal.com",
"*.itclientportal.com",
"*.login.microsoftonline.com",
"*.sharepoint.com",
"*.sharepoint-df.com",
"spoppe-a.akamaihd.net",
"spoprod-a.akamaihd.net",
"resourceseng.blob.core.windows.net",
"msft.spoppe.com"
]
When you include a custom tab in an app in Teams, that tab is supposed to reference the Teams Javascript SDK. See specifically here:
Additionally, you need to add the Teams JavaScript client SDK to your page, and call microsoftTeams.initialize() after your page loads. Doing so will tell Teams to display your page, give you access to Teams-specific information (for example if the Teams client is running the dark theme), and allow you to take action based on the results.

Failed to load the package The add-in package provided was not understood. Verify that the submitted file is a valid Office add-in package

I am trying to publish a MS Teams Chat bot on App Source but have came across the following error
Here is how my manifest.json file looks like
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json",
"manifestVersion": "1.5",
"version": "1.0.1",
"id": "0007-0007-4a9f-8163-0007",
"packageName": "MyBOT.Manifest",
"developer": {
"name": "MyCompany",
"websiteUrl": "https://MyBOT.azurewebsites.net",
"privacyUrl": "https://MyBOT.azurewebsites.net/Privacy",
"termsOfUseUrl": "https://MyBOT.azurewebsites.net/Termsofuse",
"mpnId": "0007"
},
"localizationInfo": {
"defaultLanguageTag": "en-us"
},
"icons": {
"color": "icon-color.png",
"outline": "icon-outline.png"
},
"name": {
"short": "MyBOT",
"full": "MyBOT Virtual Assistant"
},
"description": {
"short": "MyBOT",
"full": "I am a Virtual Assistant, continuously in training to enhance my skills. Currently, I can help you by answering inquiries related to COVID-19, Zoom, Webex, Microsoft Office, Adobe, Microsoft Azure and Xbox. For questions that are not currently in my search database, I leverage the web to fetch you those information."
},
"accentColor": "#F9F9FA",
"bots": [
{
"botId": "0007-0007-4a9f-8163-0007",
"needsChannelSelector": false,
"isNotificationOnly": false,
"scopes": [ "team", "personal", "groupchat" ],
"supportsFiles": false,
"isNotificationOnly": false,
"commandLists": [
{
"scopes": [ "team", "groupchat" ],
"commands": [
{
"title": "help",
"description": "Provides you the list of commands that you can enter"
},
{
"title": "cancel",
"description": "Cancels the current operation"
}
]
},
{
"scopes": [ "personal", "groupchat" ],
"commands": [
{
"title": "main menu",
"description": "This command takes you to the main menu"
},
{
"title": "help",
"description": "Provides you the list of commands that you can enter"
}
]
}
]
}
],
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": [
"token.botframework.com"
]
}
The validator gives the following error as well
I have looked into Stackoverflow for this message as well as searched online but I am not able to get an exact article on how to fix this issue. I read about how the app has to work for all types of devices but the manifest.json file doesnt show how that is to be done. Can someone forward me a template that I can build my manifest.json file on? Or am I doing something wrong altogether?
Thank you.
This file resolved the issue. We used AppStudio to get this file.
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.7/MicrosoftTeams.schema.json",
"manifestVersion": "1.7",
"version": "1.0.0",
"showLoadingIndicator": true,
"isFullscreen": true,
"id": "80007-8049-0007-8163-e89f9a80007",
"packageName": "com.myCompany.myBOT",
"developer": {
"name": "myCompany Services",
"websiteUrl": "https://myBOT.azurewebsites.net",
"privacyUrl": "https://myBOT.azurewebsites.net/Privacy",
"termsOfUseUrl": "https://myBOT.azurewebsites.net/Termsofuse",
"mpnId": "00000"
},
"icons": {
"color": "color.png",
"outline": "outline.png"
},
"name": {
"short": "myBOT",
"full": "myBOT Virtual Assistant"
},
"description": {
"short": "myBOT",
"full": "I am a Virtual Assistant, continuously in training to enhance my skills. Currently, I can help you by answering inquiries related to COVID-19, Zoom, Webex, Microsoft Office, Adobe, Microsoft Azure and Xbox. For questions that are not currently in my search database, I leverage the web to fetch you those information."
},
"accentColor": "#F9F9FA",
"bots": [
{
"botId": "80007-8049-0007-8163-e89f9a890007",
"scopes": [
"team",
"personal",
"groupchat"
],
"supportsFiles": false,
"isNotificationOnly": false
}
],
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": [] }
Can someone forward me a template that I can build my manifest.json
file on?
You can maybe start with this one (specifically for search extension), but you'll obviously want to change/trim/add it to do what you are actually wanting to do.
https://github.com/microsoft/BotBuilder-Samples/blob/master/samples/csharp_dotnetcore/50.teams-messaging-extensions-search/TeamsAppManifest/manifest.json
More samples have other examples of manifest files.
Additionally, you may want to try and create a manifest from App Studio (MS Teams app that allows you to create them).
"IsNotificationOnly"property is added twice in the manifest. Can you please try deleting it and check again.
Assuming that you already have two files "icon-color.png" and "icon-outline.png" along with the manifest.json in the app package zip file. Can you please verify if all three files are added to a zip files and no folder is created inside the zip package.

Office365 connect to office button not working for Microsoft Teams. Getting 500 error

I had created an Office365 Connector for my Microsoft Teams app. Earlier it was working perfect, I was getting notifications in my channel.
Now it has stopped working. I am getting "Something went wrong" error with message "An unexpected error has occurred". something went wrong
Any help regarding this would be appreciated. I am really stuck.
Manifest content :
{
"$schema": "https://statics.teams.microsoft.com/sdk/v1.0/manifest/MicrosoftTeams.schema.json",
"manifestVersion": "1.0",
"version": "1.1",
"id": "8471589f-f521-4d69-8d59-6a207b9e1b7b",
"packageName": "com.microsoft.teams.corrus",
"developer": {
"name": "Corrus",
"websiteUrl": "https://corrus.com/",
"privacyUrl": "https://corrus.com/terms/",
"termsOfUseUrl": "https://corrus.com/terms/"
},
"icons": {
"color": "corrus_logo.png",
"outline": "corrus_logo_outline.png"
},
"name": {
"short": "Corrus",
"full": "Corrus"
},
"description": {
"short": "A work management platform to work collaboratively and accomplish goals.",
"full": "Corrus is a work management tool for small teams to collaborate and manage projects in a cloud application. You can create tasks, build workflows and work with different stakeholders in one workspace. It helps teams align their processes and scale better as it enables them to break their goals and work into manageable blocks, create an action plan or a workflow, increase productivity and gain visibility within the team."
},
"accentColor": "#8170FF",
"configurableTabs": [
{
"configurationUrl": "https://app.corrus.com/#/tabsConfig",
"canUpdateConfiguration": true,
"scopes": [
"team"
]
}
],
"connectors": [
{
"connectorId": "8471589f-f521-4d69-8d59-6a207b9e1b7b",
"scopes": [
"team"
]
}
],
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": [
"app.corrus.com",
"corrus.com"
]
}
There was an issue when we try to configure connector for newly created team. This issue has been fixed.
Note: Adding this as answer from comments section for visibility.

Compose extension is throwing error : V3 agent not found

I am new to creating Compose Extensions in Teams and am facing an issue when I add it to my Teams.
All the configurations are in place, from registering the Bot to hosting it as a Bot Service on Azure and handling the compose extension query in the code. I have shared the Bot Id in the manifest and given the bot hosted URL with /api/messages appended to the endpoint URL.
The bot as a standalone application works locally as well as on the Azure Porta. I have successfully remote debugged it as well. However, as soon as I sideload it in Teams as a messaging extension, the query is not firing appropriately.
While typing, it stops and shows "Something went wrong with this app. Try Again".
Moreover, when we load the Compose Extension it should make an initial hit to the hosted bot application, I have the debuggers in place and it neither hits the Constructor nor the Post method.
I am getting a 404 error saying V3 agent not found and a failed POST request.
Anyone who might have faced a similar issue and has recovered from it, or may know where I may be going wrong kindly provide your advice. Highly appreciated.
{
"$schema": "https://statics.teams.microsoft.com/sdk/v1.2/manifest/MicrosoftTeams.schema.json",
"manifestVersion": "1.2",
"version": "1.0.0",
"id": "f3c14e30-0af2-4f96-b714-5d258edcab47",
"packageName": "net.azurewebsites.fetchassistant",
"developer": {
"name": "abc",
"websiteUrl": "https://fetchassistant.azurewebsites.net",
"privacyUrl": "https://fetchassistant.azurewebsites.net",
"termsOfUseUrl": "https://fetchassistant.azurewebsites.net"
},
"icons": {
"color": "color.png",
"outline": "outline.png"
},
"name": {
"short": "FetchAssistant",
"full": "Fetch Assistant"
},
"description": {
"short": "abc",
"full": "xyz"
},
"accentColor": "#235EA5",
"composeExtensions": [
{
"botId": "Microsoft App/Bot Id",
"scopes": ["personal", "team"],
"commands": [
{
"id": "FirstName",
"description": "Search Relevant Documents",
"title": "Get Name Division",
"initialRun": false,
"parameters": [
{
"name": "xyz",
"description": "Get Name Division",
"title": "Names"
}
]
}
]
}
],
"permissions": ["identity", "messageTeamMembers"],
"validDomains": ["*.microsoft.com", "*.azurewebsites.net"]
}
I was able to get through the issue you're facing by doing the following:
Navigate to https://dev.botframework.com/bots/
Click on the Microsoft Teams icon in the "Add a featured channel" section
Register your app
I was getting this error myself on an extension.
Following the idea of adding channels, I went to the channels section.
There was no Teams channel configured.
So, I added it.
And the error went away as my extension loaded.

Resources