Send files to a bot in Microsoft Teams - node.js

I'm trying to send image files to a bot in Microsoft Teams. The problem is that the "upload" button doesn't show up in the personal scope.
I've added the supportsFiles tag in the manifest and incremented the version so that it triggers the changes when reinstalled.
Here is my manifest:
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.3/MicrosoftTeams.schema.json",
"manifestVersion": "1.3",
"version": "1.0.1",
"id": "738xxxxxxxx",
"packageName": "-",
"developer": {
"name": "AAA",
"websiteUrl": "https://aaa.azurewebsites.net",
"privacyUrl": "https://aaa.azurewebsites.net",
"termsOfUseUrl": "https://aaa.azurewebsites.net"
},
"icons": {
"color": "color.png",
"outline": "outline.png"
},
"name": {
"short": "Asistente Virtual",
"full": "Asistente Virtual en Teams"
},
"description": {
"short": "VA",
"full": "VA en Teams"
},
"accentColor": "#267938",
"bots": [
{
"botId": "95dbxxxxxxxxxxx",
"scopes": [
"personal",
"team"
],
"supportsFiles": true
}
],
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": []
}
I cannot find anything else in the official documentation that could be causing the problem.
EDIT: I've realized that in the "About tab" in chat (personal scope) still appears the old version (1.0.0). But if I access my bot through my apps it shows version 1.0.1. In any case, the "upload" button doesn't show up.

Related

microsoft custom app manifest dont validate after clone

I have built a microsoft custom app with yo builder for microsoft teams and works fine, as I have uploaded into microsoft teams and test it. In addition, I push it on github. But when I clone the repo in a server in order to start deployment process, I get an error message as you can see on the uploaded image, when I try to run it with both gulp serve or gulp ngrok-serve.
My manifest.json is as follow:
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.11/MicrosoftTeams.schema.json",
"manifestVersion": "1.11",
"id": "{{APPLICATION_ID}}",
"version": "{{VERSION}}",
"packageName": "{{PACKAGE_NAME}}",
"developer": {
"name": "christos.goulas",
"websiteUrl": "https://{{PUBLIC_HOSTNAME}}",
"privacyUrl": "https://{{PUBLIC_HOSTNAME}}/privacy.html",
"termsOfUseUrl": "https://{{PUBLIC_HOSTNAME}}/tou.html"
},
"name": {
"short": "tempbot02",
"full": "tempbot02"
},
"description": {
"short": "TODO: add short description here",
"full": "TODO: add full description here"
},
"icons": {
"outline": "icon-outline.png",
"color": "icon-color.png"
},
"accentColor": "#D85028",
"configurableTabs": [],
"staticTabs": [],
"bots": [
{
"botId": "{{MICROSOFT_APP_ID}}",
"needsChannelSelector": true,
"isNotificationOnly": false,
"scopes": [
"team",
"personal",
"groupchat"
],
"commandLists": [
{
"scopes": [
"team",
"personal"
],
"commands": [
{
"title": "Help",
"description": "Shows help information"
},
{
"title": "Who am I?",
"description": "Shows information about your Teams user"
},
{
"title": "Mention me",
"description": "Let the bot #mention you"
}
]
}
]
}
],
"connectors": [],
"composeExtensions": [],
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": [
"{{PUBLIC_HOSTNAME}}"
],
"showLoadingIndicator": false
}
Adding from comment section for more visibility
There was misconfiguration in manifest.

Microrosft teams Usupported Manifest Version

I'm developing a custom teams app and until few days ago it was running ok: wep app run local from visual studio code with chrome debug, and the service app distributed on azure.
Yesterday I deleted by mistake the local app from app studio (inside visual studio code) and then I created a new app and set it as the old.
Teams recognize the app and when I run it from local (with debug from chrome) it opens a new window on chrome and I correctly see the button for install it:
When I click install I receive one popUp error: and i can see thi erro on the local visual studio debug console:
My manifest app is a standard manifest, with 1.8 version:
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.8/MicrosoftTeams.schema.json",
"manifestVersion": "1.8",
"version": "1.0.0",
"id": "d8bf27a8-a5a3-4381-9dd8-696d473450a1",
"packageName": "com.microsoft.teams.eclexia",
"developer": {
"name": "",
"websiteUrl": "https://localhost:3000",
"privacyUrl": "https://localhost:3000/privacy",
"termsOfUseUrl": "https://localhost:3000/termsofuse"
},
"icons": {
"color": "color.png",
"outline": "outline.png"
},
"name": {
"short": "",
"full": ""
},
"description": {
"short": "",
"full": ""
},
"accentColor": "#FFFFFF",
"staticTabs": [
{
"entityId": "index",
"name": "Catalogo",
"contentUrl": "https://localhost:3000/tab?tid={tid}&aaId={userObjectId}",
"websiteUrl": "https://localhost:3000/tab",
"scopes": [
"personal"
]
},
{
"entityId": "live",
"name": "Live",
"contentUrl": "https://localhost:3000/live?tid={tid}&aaId={userObjectId}",
"websiteUrl": "https://localhost:3000/live",
"scopes": [
"personal"
]
}
],
"composeExtensions": [
{
"botId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"canUpdateConfiguration": true,
"commands": [
{
"id": "searchQuery",
"type": "query",
"title": "Search",
"description": "Test command to run query",
"initialRun": false,
"fetchTask": false,
"context": [
"compose",
"commandBox"
],
"parameters": [
{
"name": "searchQuery",
"title": "Search Query",
"description": "Your search query",
"inputType": "text"
}
]
}
]
}
],
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": [
"localhost"
]
How can I solve it?
There's currently a bug with App Studio that's being addressed (see my question here: App Studio is auto-converting my app to Schema 1.9, and the failing to install it into Teams). In the meantime, you can side-load to the internal company app store, and install from there, especially if you have a Developer tenant

microsoft team custom tabs refuse to connect to page

I am trying to develop a custom app with a tab I have installed the app successfully but when i open the tab it states connection refused to the website from where the content has to be displayed. I am a newbie to Microsoft team app. Below is the manifest.json.
{
"$schema": "https://developer.microsoft.com/en-us/json-
schemas/teams/v1.7/MicrosoftTeams.schema.json",
"manifestVersion": "1.7",
"version": "1.0.0",
"isFullScreen": true,
"id": "e23cbae9-8598-4b64-bd35-d8dcd9552372",
"packageName": "com.uber",
"developer": {
"name": "Mphasis",
"websiteUrl": "https://www.mphasis.com",
"privacyUrl": "https://www.mphasis.com",
"termsOfUseUrl": "https://www.mphasis.com"
},
"icons": {
"color": "color.png",
"outline": "outline.png"
},
"name": {
"short": "uberApp",
"full": "Uber App1"
},
"description": {
"short": "testing app",
"full": "uber test app"
},
"accentColor": "#FFFFFF",
"staticTabs": [
{
"entityId": "12346",
"name": "mytab",
"contentUrl": "https://capgemini.com/in-en/careers/",
"scopes": [
"personal"
]
}
],
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": [
"capgemini.com"
]
}'''

MS Teams app manifest file Tenant restriction

I created the bot application and created the manifest file for it. I added it to the Microsoft teams and it is working fine. So if I use that manifest file with the other tenant account then also that app will be added and working. I don't want it to be like this. If the other tenant people tries to add the manifest it should not work or added. How to give tenant restriction in the manifest file? I am attaching my manifest file also.
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json",
"manifestVersion": "1.5",
"version": "1.0.0",
"id": "<id>",
"packageName": "com.example.myapp",
"developer": {
"name": "AzS",
"websiteUrl": "https://teams.com",
"privacyUrl": "https://teams.com/privacy",
"termsOfUseUrl": "https://teams.com/termsofuse"
},
"icons": {
"color": "color.png",
"outline": "outline.png"
},
"name": {
"short": "test Bot",
"full": "test App"
},
"description": {
"short": "This is a test bot",
"full": " bot"
},
"accentColor": "#FFFFFF",
"bots": [
{
"botId": "<botid>",
"scopes": [
"team",
"groupchat",
"personal"
],
"supportsFiles": true,
"isNotificationOnly": false
}
],
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": []
}
Aside from my question in the comments above, Microsoft provide a middleware as part of the bot framework itself, to filter for specific tenant id(s). Have a look at teamsTenantFilteringMiddleware
(The above is for Node). For interest, here is the C# version as well.

Icon is not visible on release task catalog in Azure DevOps pipeline. vss-extension.json as below,

{
"manifestVersion": 1,
"id": "build-release-task",
"name": "",
"version": "1.1.9",
"publisher": " ",
"targets": [
{
"id": "Microsoft.VisualStudio.Services"
}
],
"description": "",
"categories": [
"Azure Pipelines"
],
"icons": {
"default": "images/extension-icon.png"
},
"files": [
{
"path": "buildAndReleaseTask"
},
{
"path": "images",
"addressable": true
}
],
"contributions": [
{
"id": "custom-build-release-task",
"type": "ms.vss-distributed-task.task",
"targets": [
"ms.vss-distributed-task.tasks"
],
"properties": {
"name": "buildAndReleaseTask",
"icon": "images/extension-icon.png"
}
}
]
}
You should put the icon file also in the task folder (where the .ts/.ps1 files).

Resources