Skip to content

Messaging extension file attachment downloadUrl #2021

@slcwebguy

Description

@slcwebguy

I'm having to take a longer-than-expected and seemingly-less-reliable route to get access to a message's file attachments. It's causing some timeout issues for an action-based messaging-extension app that I'm building.

This issue describes what I'm running into pretty well. I took a different approach to solving it than the issue poster but it still doesn't seem great. My solution was to add an extra layer of authentication to the MsGraph api and use that to query for the attachments in OneDrive/Sharepoint. By way of extra api pulls for the team id and the drive id, I do eventually get to an endpoint that returns a downloadUrl property which allows me to download the files. Personally, I think it's cool that such a solution is possible via Graph and honestly it seems to be working decently well (aside from the timeout problem and path-based search uncertainty). However, it also seems less-reliable and unnecessarily circuitous.

Instead, are there some permissions, perhaps, that I could add to my app/bot to give it a publicly-accessible way of downloading the attachments? Is there supposed to be an action.messagePayload.attachments[n].content.downloadUrl property? If so, that would be exactly what I'm looking for. Sadly, at present, I'm getting nothing but null in action.messagePayload.attachments[n].content for the attachments that I'm testing with.

This issue seems like it might also be related to this one but I'm not seeing exactly the same thing so maybe not. This SO question also seems pretty close. Lastly, this Graph issue looks related too but again not exactly the same.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions