-
Notifications
You must be signed in to change notification settings - Fork 234
Description
When using the Python SDK to read files users upload in chat, context.activity.attachments works in Web Chat and Microsoft Teams (bot), but in Copilot in Teams it’s always None. I’m trying to retrieve user-uploaded files to process them inside the agent.
SDK version: 0.4.0
Python version: 3.11.9
Channels tested:
Web Chat (Test in Webchatattachments present)
Microsoft Teams (Microsoft 365 Developer Subscription; attachments present)
Copilot in Teams (Microsoft 365 Developer Subscription; attachments missing)
Steps to reproduce:
- Create a simple agent using Agents for Python (such as from https://github.com/microsoft/Agents/tree/main/samples/python/quickstart)
- Add logging of context.activity.attachments
- Enable MS Teams channel on Azure Bot Service resource
- Enable file upload in app manifest
- Side load custom app into MS Teams in Microsoft 365 Developer Subscription
- In Copilot in Teams, upload a file in a chat with the agent
Expected:
In Copilot for Teams, I expected that context.activity.attachments should contain the uploaded file(s), similar to Web Chat and standard Teams bot conversations, including a contentUrl (or equivalent) I can use to download the file.
Actual:
In Copilot for Teams, context.activity.attachments is always None, even when a user uploads a file with the message. However, the user experience shows a file upload succeeded, the agent’s turn simply receives no attachments.
Enabled file upload in app manifest:

Testing file attachment to user message in Copilot in Teams:

Logging results (Copilot in Teams - attachments is None even though file was attached to user message):

In MS Teams standard bot chat and Web Chat, when uploading a file in chat, the agent logs context.activity.attachments with one or more attachments containing download URL(s), but in Copilot for Teams, context.activity.attachments is always None.
Logging results (Standard Teams chat - attachments present):

Questions:
- Is user message attachment delivery to agents supported in Copilot for Teams with the Python Agents SDK today?
- If not supported yet, is there a workaround or ETA?
- Is this the same for agents accessed by user in Microsoft 365 Copilot? (I am currently only testing for Copilot through the Copilot for Teams due to its availability in the Microsoft 365 Developer Subscription)
Thanks!
