Skip to content

Microsoft Teams group chat file card is not exposed as an attachment #536

@mlenczewski-tidio

Description

@mlenczewski-tidio

Bug Description

When a user mentions a bot in a Microsoft Teams group chat and attaches a file, Teams shows the file card in the client, but the Chat SDK message does not expose the file as an attachment.

The raw Teams webhook payload only contains a text/html attachment for the message body/mention. There is no file attachment, no application/vnd.microsoft.teams.file.download.info, and no downloadUrl.

This makes it impossible for a Chat SDK bot to inspect or download the file from message.attachments, even though the user clearly attached a file in Teams.

Steps to Reproduce

  1. Create a bot using @chat-adapter/teams@4.26.0.
  2. Install/add the bot to a Microsoft Teams group chat.
  3. In the group chat, send a message mentioning the bot and attach a file, for example: Summarize what do u see in this document.
  4. Inspect the raw Teams webhook payload and/or Chat SDK message.
  5. Observe that the Teams UI shows the file card, but the webhook only includes:
    { "contentType": "text/html", "content": "<div>...</div>" }
  6. Observe that Chat SDK does not expose the attached file in message.attachments.

Expected Behavior

Chat SDK should expose the attached file through message.attachments when possible, including enough metadata to fetch the file contents.

If Teams does not provide enough file metadata in group chat webhook activities, the Teams adapter should document this limitation and ideally expose or recommend a Microsoft Graph-based resolution path.

Actual Behavior

When a user mentions the bot in a Microsoft Teams groupChat and attaches a file, the Teams client shows the file card, but the webhook activity only contains a text/html attachment for the message body/mention.

No file is exposed in Chat SDK message.attachments; there is no downloadable file attachment, no application/vnd.microsoft.teams.file.download.info, and no downloadUrl.

Code Sample

Chat SDK Version

4.26.0

Node.js Version

24

Platform Adapter

Microsoft Teams

Operating System

macOS

Additional Context

  • Package: @chat-adapter/teams
  • Platform: Microsoft Teams
  • Conversation type: groupChat
  • Message type: message
  • File type tested: PDF
  • Date observed: 2026-05-19
{
  "text": "<at>Bot</at> summarize what do u see in this document.",
  "textFormat": "plain",
  "attachments": [
    {
      "contentType": "text/html",
      "content": "<div><span itemtype=\"http://schema.skype.com/Mention\" itemscope=\"\" itemid=\"0\">Bot</span>&nbsp;summarize what do u see in this document.</div>"
    }
  ],
  "type": "message",
  "channelId": "msteams",
  "conversation": {
    "isGroup": true,
    "conversationType": "groupChat",
    "tenantId": "01936335-ab00-42fc-a563-15c35a436288",
    "id": "19:08044853a4034b17b2c0a6394547a5ba@thread.v2"
  },
  "entities": [
    {
      "mentioned": {
        "id": "28:01936335-ab00-42fc-a563-15c35a436288",
        "name": "Bot"
      },
      "text": "<at>Bot</at>",
      "type": "mention"
    }
  ]
}

Microsoft Teams appears to handle files differently depending on scope:

In personal bot chats, Teams bot file APIs can send application/vnd.microsoft.teams.file.download.info.
In group chats/channels, files appear to be OneDrive/SharePoint references and may need Microsoft Graph resolution instead

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions