How to attach files from OneDrive to an email using sendEmail endpoint

Stanislav Gorchakov 0 Reputation points
2023-08-23T11:40:04.18+00:00

I am using the sendEmail endpoint, and I want to attach small files from OneDrive as a copy. What is the best way to accomplish this task?

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. TH-4749-MSFT 3,315 Reputation points
    2023-08-28T18:01:22.6966667+00:00

    Hi Stanislav Gorchakov,

    Thanks for reaching out. Currently it is not possible to attach files from OneDrive as a Copy. You can however use the attach the file as a OneDrive reference link. Please refer to article https://learn.microsoft.com/en-us/graph/api/resources/referenceattachment?view=graph-rest-beta. Please note the above is a beta API and APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported.

    Also please refer to this post https://learn.microsoft.com/en-us/answers/questions/679349/how-to-add-onedrive-files-to-mail-attatchment for info on the topic.

    I would suggest posting your query on the raph Feedback forum.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    Thanks.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.