Building, integrating, or customizing apps and workflows within Microsoft Teams using developer tools and APIs
A message with file attachment from mobile Teams app to bot does not include the attachment part
Boris Rusinovic
96
Reputation points
Sending a message with the file attachment from a mobile phone Teams app (Android or iPhone) does not include the attachment part. For comparison, the same message sent from the desktop Teams works fine and includes an attachment.
Sample message from desktop Teams app:
{
"attachments": [
{
"contentType": "application/vnd.microsoft.teams.file.download.info",
"content": {
"downloadUrl": "https://...etc...",
"uniqueId": "a7cca033-97bd-4abd-9a32-e1dd5f0c7d17",
"fileType": "pdf"
},
"contentUrl": "https://delteko365-my.sharepoint.com/personal/borisrusinovic_deltek_com/Documents/Microsoft Teams Chat Files/DummyInvoice.pdf",
"name": "DummyInvoice.pdf"
},
{
"contentType": "text/html",
"content": ""
}
],
"type": "message",
"timestamp": "2024-09-24T15:17:23.9742756Z",
"localTimestamp": "2024-09-24T11:17:23.9742756-04:00",
"id": "1727191043951",
"channelId": "msteams",
"serviceUrl": "https://smba.trafficmanager.net/amer/",
"from": {
"id": "29:1njfk_ZmY9fN13a4Z5Y--A4ULrdMndmNCG3Qw1uWgdjUgQ_VMYAnoqbgK95jdYzcvP0tkqHPPr4ANEHRQR9XJCg",
"name": "Boris Rusinovic",
"aadObjectId": "7f7164f9-442d-4704-b62f-894e87f14637"
},
"conversation": {
"conversationType": "personal",
"tenantId": "37d75c7a-7cb8-4ef7-8a8f-2108fe6cadbe",
"id": "a:1lClE4vfnOTwDU2BBF92h4cccCZ3iHZ49498kizHStVKf7rqjXsV3LBXBCDPwQhI7ZYACyyL26QoCBQYihxV6LBQO2Gt_kSTbKcqIWKaxdmJH2HdyO9NBDVwWVcCTvtxX"
},
"recipient": {
"id": "28:d0c5687b-56e6-4260-8b0f-9d75370e39e6",
"name": "Costpoint"
},
"entities": [
{
"locale": "en-US",
"country": "US",
"platform": "Windows",
"timezone": "America/New_York",
"type": "clientInfo"
}
],
"channelData": {
"tenant": {
"id": "37d75c7a-7cb8-4ef7-8a8f-2108fe6cadbe"
}
}
}
Trying to do the same thing on mobile Teams app:
{
"type": "message",
"timestamp": "2024-09-24T15:35:35.0025803Z",
"localTimestamp": "2024-09-24T17:35:35.0025803+02:00",
"id": "1727192134980",
"channelId": "msteams",
"serviceUrl": "https://smba.trafficmanager.net/amer/",
"from": {
"id": "29:1njfk_ZmY9fN13a4Z5Y--A4ULrdMndmNCG3Qw1uWgdjUgQ_VMYAnoqbgK95jdYzcvP0tkqHPPr4ANEHRQR9XJCg",
"name": "Boris Rusinovic",
"aadObjectId": "7f7164f9-442d-4704-b62f-894e87f14637"
},
"conversation": {
"conversationType": "personal",
"tenantId": "37d75c7a-7cb8-4ef7-8a8f-2108fe6cadbe",
"id": "a:1lClE4vfnOTwDU2BBF92h4cccCZ3iHZ49498kizHStVKf7rqjXsV3LBXBCDPwQhI7ZYACyyL26QoCBQYihxV6LBQO2Gt_kSTbKcqIWKaxdmJH2HdyO9NBDVwWVcCTvtxX"
},
"recipient": {
"id": "28:d0c5687b-56e6-4260-8b0f-9d75370e39e6",
"name": "Costpoint"
},
"entities": [
{
"locale": "en-US",
"country": "US",
"platform": "Android",
"timezone": "Europe/Zagreb",
"type": "clientInfo"
}
],
"channelData": {
"tenant": {
"id": "37d75c7a-7cb8-4ef7-8a8f-2108fe6cadbe"
}
},
"locale": "en-US",
"localTimezone": "Europe/Zagreb"
}
At the same time the Media attachment works fine on mobile Teams app:
Microsoft Teams | Development
Microsoft Teams | Development
Sign in to answer