I've been trying to use Copilot Studio to process files uploaded by users in Microsoft Teams, but the bot doesn't recognize the files.
Only after thoroughly examining both the Teams message structure and the 'System.Activity' object in Copilot Studio did I realize that the Attachments
array is consistently empty; the attachment information isn't being passed through at all.
If there were at least some indication that an attachment exists (even if not in the standard Attachments field), I could potentially work around it by trying to fetch the original Teams message details (using a message ID, for example) to retrieve the attachment ID or filename. However, since there's absolutely no trace of the attachment in the data accessible to Copilot Studio, I'm completely stuck.
I genuinely can't understand why the file attachment capability is even enabled for Copilot Studio bots in Teams if it's entirely non-functional. It seems impossible to use.
Below are the Teams message body and the Copilot Studio 'System.Activity' object, respectively. Both originate from the same single message instance where a file was attached:
{
"entity": {
"teamsFlowRunContext": {
"MessagePayload": {
"Id": "****",
"From": {
"Application": null,
"Conversation": null,
"Device": null,
"User": {
"DisplayName": "****",
"Id": "****"
}
},
"Body": {
"ContentType": "html",
"Content": "<p>ㅁㅁㅁㅁ</p><attachment id=\"****\"></attachment>",
"PlainText": "ㅁㅁㅁㅁ"
},
"Subject": "",
"LinkToMessage": "https://teams.microsoft.com/l/message/****/****@unq.gbl.spaces/****?context=%7B%22contextType%22:%22chat%22%7D",
"ReplyToId": null
},
"Id": "f:****",
"ChannelData": {
"EventType": null,
"InvalidateInvokeCache": null,
"Team": null,
"Tenant": {
"Id": "****"
},
"Channel": null,
"Notification": null,
"OnBehalfOf": null
},
"From": {
"Id": "8:orgid:****",
"Name": "****",
"Role": null,
"AadObjectId": "****",
"Properties": null
},
"Conversation": {
"Id": "19:****_****@unq.gbl.spaces",
"Name": null,
"IsGroup": null
},
"Locale": "ko-KR",
"CommandContext": "message",
"LocalTimezone": "Korea Standard Time"
},
"cardOutputs": {}
}
}
{
"Activity": {
"Attachments": [],
"Channel": {
"$kind": "OptionDataValue",
"type": {
"$kind": "SystemOptionSet",
"name": "ChannelId"
},
"value": "MsTeams"
},
"ChannelData": {
"tenant": {
"id": "****"
}
},
"ChannelId": "msteams",
"From": {
"Id": "29:****",
"Name": "****"
},
"Name": null,
"Recipient": {
"Id": "28:****",
"Name": "앤서니"
},
"Text": "ㅁㅁㅁㅁ",
"Type": {
"$kind": "OptionDataValue",
"type": {
"$kind": "SystemOptionSet",
"name": "ActivityType"
},
"value": "Message"
},
"TypeId": "message",
"Value": null
},
"Bot": {
"Components": {
"Actions": {
"****.action.OneDrive-": {
"DisplayName": "------"
}
},
"Topics": {
"****.topic.ConversationStart": null,
"****.topic.Greeting": {
"DisplayName": "---"
},
"****.topic.ObDgRvKaQwfiiGRp02aBf": null,
"****.topic.OnError": null,
"****.topic.ResetConversation": null,
"****.topic.Signin": null,
"****.topic.StartOver": {
"DisplayName": "-----"
},
"****.topic.ThankYou": null
}
},
"EnvironmentId": "Default-****",
"Id": "****",
"Name": "앤서니",
"SchemaName": "****",
"TenantId": "****"
},
"ClientPluginActions": [],
"Conversation": {
"Id": "a:****",
"InTestMode": false,
"LocalTimeZone": "Asia/Seoul",
"LocalTimeZoneOffset": {
"$kind": "TimeDataValue",
"value": "09:00:00"
}
},
"LastMessage": {
"Id": "****",
"Text": "ㅁㅁㅁㅁ"
},
"Recognizer": {
"TriggeringMessage": {
"Id": "****",
"Text": "안녕"
}
},
"User": {
"DisplayName": "****",
"Email": "****",
"FirstName": "****",
"Id": "****",
"IsLoggedIn": true,
"Language": {
"$kind": "OptionDataValue",
"type": {
"$kind": "SystemOptionSet",
"name": "Locale"
},
"value": "Korean"
},
"LastName": "****",
"PrincipalName": "****"
}
}
DO-29051811-0
4
ronaldwalcott
2
Michael E. Gernaey
2
Super User 2025 Season 1