OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
657 stars 93 forks source link

Get attachment content id #3482

Closed hmuris closed 10 months ago

hmuris commented 1 year ago

As described in the issue here, I also need to get attachment CID. I have an email with inline attachments, and all the information are there, including attachment (data, mime type...) but there is no link between body and the inline attachment. Is there any way, without using Graph of EWS, to get this information using office.js?

hmuris commented 1 year ago

Shouldn't at least triage find place for this question? I read that within 72 hours it should.

AkhileshShah-MS commented 1 year ago

Thanks for reaching out @hmuris! I have triaged this issue to @exextoc to help further. Could you please look into this issue? Thanks!

hmuris commented 11 months ago

Hello, is there any plan for this topic, any reaction?

sebammon commented 10 months ago

@AkhileshShah-MS Is there any update on this issue? I am currently facing a similar issue. Our requirement is to match the inline attachments that we get from the attachments property on the item, with the attachments' cids in the HTML body of the email.

Is there any way to do this?

exextoc commented 10 months ago

Currently the feature to get attachment cid, you requested, is not a part of the product. We track Outlook add-in feature requests on our Tech Community Page. Please submit your request there and choose the appropriate label(s). Feature requests on Tech Community are considered, when we go through our planning process.

Github Label: “Type: product feature request” https://aka.ms/M365dev-suggestions

[Outlook Add-ins Engineering Team]

hmuris commented 10 months ago

@sebammon there is way. What I tested and it is working is to use Microsoft Graph and call '/me/messages/' + id + '/attachments'. This returns attachments including the content id. Other way, what I did not yet try is to use Office.context.mailbox.makeEwsRequestAsync(...) and request attachments this way.

exextoc commented 10 months ago

@hmuris Glad that you found a solution of the problem using Graph API. Closing the issue.