Jamie-Everlaw
Mar 13, 2023Copper Contributor
Status:
New
Add downloadUrl to Teams chatMessageAttachment
https://github.com/microsoftgraph/msgraph-sdk-javascript/issues/200 outlines the issue nicely.
Part of my app downloads chat attachments.
For chatMessageAttachments, however, there's no downloadUrl to fetch the contents of the attachment through the graph API. There's only a contentUrl which points to the web address of the attachment.
I've been using a workaround where I fetch all drives and build a map from their base URLs to their IDs, then split chatMessageAttachment.contentUrl into the drive base URL, and the file path.
The workaround isn't ideal since it takes a number of requests to get the drives, isn't guaranteed to be complete, and, most importantly, requires an extra permission (Sites.Read.All).
No CommentsBe the first to comment