May i know how to get / delete attachments created as recurring event?

Carl Ku (Hong Kong) 1 Reputation point
2021-12-17T10:00:39.627+00:00

May i know how to get / delete attachments created as recurring event on graph? Could you give me documents about it?

Problem :
I am faced issue as created recurring event with attachments using graph api (For example recurring event on 2021-12-17 and 2021-12-18), both recurring event can see those attachments. However, when i delete it by using event id of 2021-12-17 "DELETE /users/{userPrincipalName}/events/{id}/attachments/{id}", it will return error.

Could you help for provide documents about this case?

Regards,
Carl

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

2 answers

Sort by: Most helpful
  1. JanardhanaVedham-MSFT 3,566 Reputation points
    2022-01-18T17:16:40.147+00:00

    Hi @Carl Ku (Hong Kong) ,

    I did verified the above mentioned use use and I am unable to replicate it at my end. Microsoft Graph events attachments API (add/get/delete) is working fine as expected. You can also verify using the below Graph API.

    1.Created a recurring event as shown below
    Example : POST https://graph.microsoft.com/v1.0/me/events
    166151-image.png

    2.Attached an attachment to the existing recurring event and here file attachment has taken as an example :

    Example :

    POST https://graph.microsoft.com/v1.0/me/events/{event-id}/attachments  
    

    166096-image.png

    3.Get the attachments associated with the existing recurring event:

    Example :

    GET https://graph.microsoft.com/v1.0/me/events/{event-id}/attachments    
    GET https://graph.microsoft.com/v1.0/me/events/{event-id}/attachments/{attachment-id}  
    

    166000-image.png

    4.Delete the attachment associated with the existing recurring event:

    Example :

    DELETE https://graph.microsoft.com/v1.0/me/events/{event-id}/attachments/{attachment-id}  
    

    166105-image.png

    Sources (Please refer below documentation links for more information):
    https://learn.microsoft.com/en-us/graph/api/user-post-events?view=graph-rest-1.0&tabs=http#example-3-create-a-recurring-event
    https://learn.microsoft.com/en-us/graph/api/event-post-attachments?view=graph-rest-1.0&tabs=http
    https://learn.microsoft.com/en-us/graph/api/attachment-get?view=graph-rest-1.0&tabs=http
    https://learn.microsoft.com/en-us/graph/api/attachment-delete?view=graph-rest-1.0&tabs=http

    Hope this helps.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it ,so that it will be helpful to the other community users. If you have any further questions about this answer, please click "Comment".

    0 comments No comments

  2. Carl Ku (Hong Kong) 1 Reputation point
    2022-01-19T02:40:14.49+00:00

    Hi @JanardhanaVedham-MSFT ,

    Sorry for my misdirection, may i clear the issue as below:

    Problem :
    I am faced issue as created recurring event with create attachments using on the graph api "POST /me/events" (create attachments in this same graph api because we want all occurrence calendar event that share those attachments). However, when i delete it for all occurrence calendar event by using event id of recurring master "DELETE /me/events/{event-id}/attachments/{attachment-id}", it will return error.
    So, that mean we can't add attachments within create recurring event, only can add/edit each occurrence calendar event?

    Regards,
    Carl

    0 comments No comments

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.