Share via

send attachment with create event api not working

Arora, Nancy 21 Reputation points
2023-04-10T14:36:22.7566667+00:00

Hi, When sending attachment in payload and using api POST /users/{id | userPrincipalName}/events attachment is not getting in response. When using add attachment api(POST /users/{id | userPrincipalName}/events/{id}/attachments) this is working fine. I dont want want to use two api. In create event api not possible to send an attachments?

Microsoft Security | Microsoft Graph
0 comments No comments

Answer accepted by question author

CharanyaB-MSFT 1,896 Reputation points
2023-04-10T16:58:02.7333333+00:00

Hello @Arora, Nancy,

Thanks for reaching out!

Currently Graph API supports only to add an attachment to an already existing event. Please use POST /users/{id | userPrincipalName}/events/{id}/attachments API to add attachment to an event.

Documentation reference: https://learn.microsoft.com/en-us/graph/api/event-post-attachments?view=graph-rest-1.0&tabs=http#:~:text=Use%20this%20API%20to%20add%20an%20attachment%20to%20an%20existing%20event.

Hope this helps.

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

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

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