I've developed an add-in for Outlook, it needs to be able to access attachments to emails.
On the desktop app, if I move an email with attachments from a shared folder to my main inbox, then try to run the add-in on it, i get the error:
The specified attachment Id is invalid.
However, if I perform exactly the same operation through the web app, it works fine.
I have checked and the Office.context.mailbox.item.itemId
and Office.context.mailbox.item.attachments[i].id
are exactly the same whether on web or desktop.
Emails with attachments that have not been moved from a different folder, and emails without attachments work fine.
I am fetching the attachment on a remote server through a PHP script, using a callback token I orginally get from Office.context.mailbox.getCallbackTokenAsync
. The requests are made via EWS requests.
I am running Office 365 and the Outlook version is 1910 (Build 12130.20390), running on Windows 10.
Can somebody please help?
getAttachmentContentAsync
- following the example on that page throws an error sayingitem.getAttachmentsAsync is not a function
. According to this other reply here,getAttachmentContent
is not implemented for OWA yet - is that still the case? I need this to work for both the desktop and web apps. – Jai ReddenOffice.context.mailbox.item
object. Use that info to create a form, allowing the user to select which attachments they wish to interact with. Send that form to another server with the attachment details, and fetch those attachments via EWS, using the id's provided in the form. – Jai Redden