We are retrieving the email and attachments using the oAuth token from getCallbackTokenAsync
in office.js JavaScript library and sending the token to the web application to retrieve them from EWS (~/EWS/Exchange.asmx
) using SOAP request similar to the approach shown in https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/get-attachments-of-an-outlook-item
https://devblogs.microsoft.com/microsoft365dev/outlook-rest-api-v2-0-deprecation-notice/
getCallbackTokenAsync
method to retrieve the token OR making the SOAP request to download attachments.EWS remains unchanged for Outlook web add-ins. Make sure that you don't use the isRest
option for the getCallbackTokenAsync
call.
Take a look at the recent Office add-ins community call where this question was discussed in depth. Here is a screenshot for others: