I am working on Office add-in.
I tried to delete an attachment file with attachment id using Outlook add-in API (removeAttachmentAsync) or EWS (DeleteAttachment), but it didn't work.
Error messages hook on are "5010 An internal error has occurred" and "ErrorAccessDenied The requested web method is unavailable to this caller or application."
Addins are only allowed to call a subset of EWS Operations these are all listed on https://learn.microsoft.com/en-us/outlook/add-ins/web-services. DeleteAttachment (or Delete anything) is not a permitted EWS operation. removeAttachmentAsync should work okay but is only available in compose is this a compose addin ?