Microsoft Teams group chat file card is not exposed as an attachment
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 314
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 63
Description
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
- Create a bot using @chat-adapter/teams@4.26.0.
- Install/add the bot to a Microsoft Teams group chat.
- In the group chat, send a message mentioning the bot and attach a file, for example: Summarize what do u see in this document.
- Inspect the raw Teams webhook payload and/or Chat SDK message.
- Observe that the Teams UI shows the file card, but the webhook only includes:
{ "contentType": "text/html", "content": "<div>...</div>" } - 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> 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the @chat-adapter/teams package by tracing how Microsoft Teams groupChat webhook attachments become message.attachments. Compare the raw text/html-only payload with personal-chat file metadata and investigate the Microsoft Graph resolution path. Done means either exposing usable file metadata when available or documenting the group-chat limitation and recommended resolution path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100