Reputation: 916
We have built an Outlook addin using the Office JavaScript API for outlook. Our addin has a feature where the user can choose to save the attachment on the email from the addin pane. We get all the attachment Ids on email Item using the office JS API Office.context.mailbox.item.attachments
.
We then extract the Authentication token for using on the back-end to access emails.
In the Backend (.net Core) we make an EWS Call (Microsoft.Exchange.WebServices.Data.ExchangeService
) to extract the attachment on the email using the token. It gets the attachment details. 95% of the times the attachment Ids from EWS match the attachment Ids from Office JS API. However in a few instances, the attachmentId from EWS is different from attachment id in officeJS.
Does anyone know what are the conditions when the attachmentId
could change between the officeJS and EWS calls?
Edit:
This is the Item ID for the email that we get from the OfficeJS API.
AAMkADRjMDhiMjI1LWZiMDYtNDFjOS1hODY1LWNjYWI4ODIyNTdjZQBGAAAAAAD6BIgnGKX9T7ArUySXdtR8BwAzmyFPpmt3R5gtojict5n/AAANunoYAAAzmyFPpmt3R5gtojict5n/AADX+6lsAAA=
This is the Id of the attachment OfficeJS API told us existed in the email.
AAMkADRjMDhiMjI1LWZiMDYtNDFjOS1hODY1LWNjYWI4ODIyNTdjZQBGAAAAAAD6BIgnGKX9T7ArUySXdtR8BwAzmyFPpmt3R5gtojict5n/AAAAAAEMAAAzmyFPpmt3R5gtojict5n/AADX+0KqAAABEgAQAJ3qHJiNqoxEnYhbU77EaDE=
However these are the 3 attachment Ids that were returned by the EWS service
AAMkADRjMDhiMjI1LWZiMDYtNDFjOS1hODY1LWNjYWI4ODIyNTdjZQBGAAAAAAD6BIgnGKX9T7ArUySXdtR8BwAzmyFPpmt3R5gtojict5n/AAANunoYAAAzmyFPpmt3R5gtojict5n/AADX+6lsAAABEgAQAICb3poqh/xJieLT/Rsw59Y=
AAMkADRjMDhiMjI1LWZiMDYtNDFjOS1hODY1LWNjYWI4ODIyNTdjZQBGAAAAAAD6BIgnGKX9T7ArUySXdtR8BwAzmyFPpmt3R5gtojict5n/AAANunoYAAAzmyFPpmt3R5gtojict5n/AADX+6lsAAABEgAQAM1cKd+mL05NqJmTQa+Ads4=
AAMkADRjMDhiMjI1LWZiMDYtNDFjOS1hODY1LWNjYWI4ODIyNTdjZQBGAAAAAAD6BIgnGKX9T7ArUySXdtR8BwAzmyFPpmt3R5gtojict5n/AAANunoYAAAzmyFPpmt3R5gtojict5n/AADX+6lsAAABEgAQAJ3qHJiNqoxEnYhbU77EaDE=
Upvotes: 0
Views: 257