Compose extension is throwing error : V3 agent not found - botframework

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.

Related

Publishing Power App to Team Store Invalid App Manifest File

I was tasked to develop a power app and publish to Microsoft Team Store (Organization Only). I have done the application development.
When I try to publish the App to App store , I got to know that team app manifest file need to be done. So I used guide can created the manifest file as bellow.
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.7/MicrosoftTeams.schema.json",
"manifestVersion": "1.7",
"version": "1.0.0",
"id": "c3396bee-dcd6-4d8e-a683-23f16a23d0b8",
"packageName": "MyAppPackage",
"developer": {
"name": "API Team",
"websiteUrl": "https://www.myOrg.com",
"privacyUrl": "https://myOrg.com/privacy",
"termsOfUseUrl": "https://myOrg.com/toc"
},
"name": {
"short": "my App Name",
"full": "my app Long Name"
},
"description": {
"short": "my app short descrption.",
"full": "My app long description."
},
"icons": {
"outline": "icon-outline.png",
"color": "icon-color.png"
},
"accentColor": "#FFBB00",
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": [
"virtusa.com"
],
"defaultInstallScope": "personal",
"powerAppInfo": {
"powerAppId": "c3fd6bee-dcd6-gf8e-a683-23ere6a23d0b8",
"entityId": "00000000-0000-0000-0000-000000000000",
"webUrl": "power app url"
}
}
When I validate this in Developer Portal I'm getting bellow validation issue
Property "defaultInstallScope" has not been defined and the schema does not allow additional properties.
Property "powerAppInfo" has not been defined and the schema does not allow additional properties.
So I removed these properties and resubmitted, then app is properly validating, once I imported to Dev Portal and preview in teams I get bellow
Unfortunately I do not get any installation option as a personal app in team app store.
I have tried different app manifest version but still the same.
I'm trying to host the app as personal app for team in my org. before doing that I use developer portal to validate and priview.
the app should able to access by users in org (can publish to app sore)

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.

Microsoft Teams Connector unable to save configuration

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

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.

Resources