question

rajasekhargogineni-8812 avatar image
0 Votes"
rajasekhargogineni-8812 asked saldana-msft edited

How to add file attachment in the mailbody when I send meeting invitation to some one (API:https://graph.microsoft.com/v1.0/me/events)

API:https://graph.microsoft.com/v1.0/me/events
Request Body:{
"subject": "My event",
"start": {
"dateTime": "2021-07-08T04:46:05.073Z",
"timeZone": "UTC"
},
"end": {
"dateTime": "2021-07-15T04:46:05.073Z",
"timeZone": "UTC"
}
}

microsoft-graph-mailmicrosoft-graph-calendarmicrosoft-graph-filesmicrosoft-graph-reports
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, is there any update on your issue? I am willing to hear from you. :)

0 Votes 0 ·

1 Answer

JosephXu-MSFT avatar image
0 Votes"
JosephXu-MSFT answered

It is not supported to create an event along with attachments within a single request, only we can post an attachment to the event after it's created.

We can use the following API to add an attachment to an existing event.

POST /me/events/{eventid}/attachments

{
  "@odata.type": "#microsoft.graph.fileAttachment",
  "name": "$(fileName)",
  "contentBytes": "$(base64EncodedString)"
}
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.