User Profile
nigelgomm
Copper Contributor
Joined 6 years ago
User Widgets
Recent Discussions
Re: REST API question : downloading attachments
best i could find so far is to search messages for the file name .../messages/?$search="attachment:{Name}"&$expand=Attachments and then loop through the returned messages and their attachments looking for the specific id. not ideal... but it's working. n.b. you have to replace any "/" characters with "-" and any "+" with "_" in the attachmentid when comparing with the id returned in the search.2.5KViews0likes0CommentsREST API question : downloading attachments
If I drag and drop an email attachment from a web outlook (that is from https://outlook.office.com/mail/inbox open in a browser) to my desktop application I see the following JSON string in the drop event. attachmentV{"itemType":"attachment","attachmentFile":{"attachmentItemId":"AAMkADhmNz......","name":"feb invoices archive.pdf","size":64276,"fileType":5,"type":"ItemIdAttachment:#Exchange"}} so I have the attachmentItemId but no messageId…. And yet the only endpoints I see for the rest API require a messageId. e.g. GET https://outlook.office.com/api/v2.0/me/messages/%7bmessage_id%7d/attachments/%7battachment_id%7d Is there a way to download an attachment without knowing the message id? Or of finding the messageid that this attachment belongs to?2.6KViews0likes1Comment
Recent Blog Articles
No content to show