Problem
Inline images pasted with Ctrl+V in Teams DMs are detected by the plugin but never downloaded. The log shows:
"inline images detected but none downloaded"
"graph media fetch empty"
File attachments (paperclip icon) work fine.
Environment
- OpenClaw: 2026.2.21-2
- MS Teams plugin: 2026.2.21 (stock)
- Bot type: Single-tenant, Application permissions
- Graph permissions:
Chat.Read.All, ChannelMessage.Read.All, Sites.ReadWrite.All, User.Read.All, Mail.Send — all admin-consented
Root Cause Analysis
The plugin code in inbound-media.ts first tries downloadMSTeamsAttachments() which attempts to download inline <img> URLs from HTML attachments. For Ctrl+V images in DMs, the img src is typically an asm.skype.com hosted content URL that requires authentication — this direct download fails.
The fallback path calls buildMSTeamsGraphMessageUrls() which constructs a Graph API URL using the conversationId from the Bot Framework activity. It then calls downloadMSTeamsGraphMedia() which fetches /hostedContents on that URL. This also returns empty.
However, manually querying the Graph API with the correct chat ID works perfectly:
GET /v1.0/chats/{chatId}/messages/{messageId}/hostedContents
→ Returns 1 hosted content item, 415KB image downloads successfully
The issue appears to be that the conversationId from the Bot Framework activity may not match the format expected by the Graph API chat endpoint, or there is a URL encoding issue when constructing the Graph message URL for DM conversations.
Steps to Reproduce
- Configure MS Teams bot with
Chat.Read.All application permission
- Send a DM to the bot
- Paste an image with Ctrl+V (not as file attachment)
- Observe: text arrives but image is missing
- Check logs for "inline images detected but none downloaded" + "graph media fetch empty"
Expected Behavior
Inline pasted images in DMs should be downloaded via the Graph API hostedContents endpoint and forwarded to the agent.
Workaround
Use the file attachment button (paperclip) instead of Ctrl+V to send images to the bot.
Problem
Inline images pasted with Ctrl+V in Teams DMs are detected by the plugin but never downloaded. The log shows:
File attachments (paperclip icon) work fine.
Environment
Chat.Read.All,ChannelMessage.Read.All,Sites.ReadWrite.All,User.Read.All,Mail.Send— all admin-consentedRoot Cause Analysis
The plugin code in
inbound-media.tsfirst triesdownloadMSTeamsAttachments()which attempts to download inline<img>URLs from HTML attachments. For Ctrl+V images in DMs, the img src is typically anasm.skype.comhosted content URL that requires authentication — this direct download fails.The fallback path calls
buildMSTeamsGraphMessageUrls()which constructs a Graph API URL using theconversationIdfrom the Bot Framework activity. It then callsdownloadMSTeamsGraphMedia()which fetches/hostedContentson that URL. This also returns empty.However, manually querying the Graph API with the correct chat ID works perfectly:
The issue appears to be that the
conversationIdfrom the Bot Framework activity may not match the format expected by the Graph API chat endpoint, or there is a URL encoding issue when constructing the Graph message URL for DM conversations.Steps to Reproduce
Chat.Read.Allapplication permissionExpected Behavior
Inline pasted images in DMs should be downloaded via the Graph API hostedContents endpoint and forwarded to the agent.
Workaround
Use the file attachment button (paperclip) instead of Ctrl+V to send images to the bot.