Search code examples
javascriptmicrosoft-graph-apioutlook-web-addins

Outlook Web Add In with Graph API - Is it possible to include current item as an attachment when forwarding/sending an email?


I want to be able to send my current item as an attachment to another mailbox as an 'Outlook Item'. This would include any attachments attached to my current item.

I have used the graph API to return my current item in its entirety, but its the forwarding this as an attachment part im struggling with.

Im using this doc as a guide and at Request 3 it touches on attachments , but i havent seen anyone attach an Outlook item as an attachment

https://learn.microsoft.com/en-us/graph/api/user-sendmail?view=graph-rest-1.0&tabs=http

I would rather forward the current item as an attachment as opposed to just forwarding the message body, but im not sure if this is possible ?

Any insight on this is much appreciated. Thanks!


Solution

  • You need to use the ItemAttachment resource type to add the message/event/post as attachment. Here's the documentation for it!