Hello Microsoft Support Team, I am experiencing an inconsistency with file attachments when interacting with our bot in Microsoft Teams. When a file is uploaded in a 1:1 chat with the bot, all relevant attachment details are provided, including the file’

Vivek 0 Reputation points
2024-11-04T12:48:34.02+00:00

Hello Microsoft Support Team,

I am experiencing an inconsistency with file attachments when interacting with our bot in Microsoft Teams. When a file is uploaded in a 1:1 chat with the bot, all relevant attachment details are provided, including the file’s downloadUrl, uniqueId, fileType, and contentUrl. However, when the same bot is used in a Teams channel, the bot response lacks some of these details, specifically the downloadUrl and other attachment metadata.

Here are the specifics:

In 1:1 Chat: The bot receives full attachment information and functions as expected.

In Channel: Only partial information is provided upon file attachment, which affects the bot's functionality for processing files.

I've verified that the bot manifest includes permissions for Files.Read.All, ChannelMessage.Read.Group, and ChatMessage.Read.Chat, along with "supportsFiles": true in the bots section.

Could you assist in identifying if there are additional permissions required or any known limitations when bots interact with files in channel conversations compared to 1:1 chats? Any guidance on how to ensure consistent attachment data in both contexts would be greatly appreciated.

Thank you for your assistance!

this is webhook payload i am getting when using chat with bot .

{   "attachments": [     {       "contentType": "application/vnd.microsoft.teams.file.download.info",       "content": {         "downloadUrl": "https://dummysharepoint.com/_layouts/15/download.aspx?UniqueId=dummy-id&Translate=false&tempauth=dummy-token&ApiVersion=2.0",         "uniqueId": "dummy-id",         "fileType": "json"       },       "contentUrl": "https://dummysharepoint.com/Documents/Microsoft Teams Chat Files/sample_file.json",       "name": "sample_file.json"     },     {       "contentType": "text/html",       "content": ""     }   ],   "type": "message",   "timestamp": "2024-10-23T07:12:37.0000000Z",   "localTimestamp": "2024-10-23T12:42:37.0000000+05:30",   "id": "dummy-message-id",   "channelId": "msteams",   "serviceUrl": "https://dummy.trafficmanager.net/",   "from": {     "id": "29:dummy-id",     "name": "Dummy User",     "aadObjectId": "dummy-aad-id"   },   "conversation": {     "conversationType": "personal",     "tenantId": "dummy-tenant-id",     "id": "a:dummy-conversation-id"   },   "recipient": {     "id": "28:dummy-recipient-id",     "name": "Dummy Bot"   },   "entities": [     {       "locale": "en-GB",       "country": "GB",       "platform": "Web",       "timezone": "Asia/Calcutta",       "type": "clientInfo"     }   ],   "channelData": {     "tenant": {       "id": "dummy-tenant-id"     }   },   "locale": "en-GB",   "localTimezone": "Asia/Calcutta" } 
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,345 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.