Update this and following instances of a recurring event using Microsoft Graph API

Browsing Calendar 11 Reputation points
2022-01-12T21:55:26.707+00:00

I want to use Microsoft Graph API to update this and following instances of a recurring event in Outlook Calendar. I tried the Update event API https://learn.microsoft.com/en-us/graph/api/event-update?view=graph-rest-1.0&tabs=http, but I found this API updated the entire series of a recurring event.

I did some search online. I find one way to do this is to first update the end time of the recurring series so that the existing series ends at a specific instance. Then create a new recurring series for this and following instances. However, this approach will delete customized changes to any future instance. For example, I move a future instance to a different time, then I update the event title of all future instances using this approach. After the update, the change of time to that future instance will be gone.

I am wondering about the recommended way to update this and following instances of a recurring event, since we don't want to delete customized changes to any future instance if only a minor update (e.g. change event title) is done. I am also wondering whether there is a Microsoft Graph API for this operation.

Thank you!

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,044 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AtulThorat-MSFT 391 Reputation points
    2022-01-14T18:43:41.417+00:00

    Hi @Browsing Calendar ,

    There is way with which we can update this and following instances of a recurring event in Outlook Calendar.

    Please refer below MS document for the same.

    event-update

    patternedrecurrence

    recurrencepattern

    recurrencerange

    Example : Update an recurring event using Calendar API (Sample Request)

    PATCH https://graph.microsoft.com/v1.0/me/events/{id}  
        Content-type: application/json  
          
        {  
          "originalStartTimeZone": "originalStartTimeZone-value",  
          "originalEndTimeZone": "originalEndTimeZone-value",  
          "responseStatus": {  
            "response": "",  
            "time": "datetime-value"  
          },  
          "recurrence": null,  
          "reminderMinutesBeforeStart": 99,  
          "isOnlineMeeting": true,  
          "onlineMeetingProvider": "teamsForBusiness",  
          "isReminderOn": true,  
          "hideAttendees": false,  
          "categories": ["Red category"]  
        }  
          
    

    So we have recurring events in calendar as shown in below.

    165157-recurring-events-in-calendar.png

    We can fetch these recurring event details using Graph API GET call as shown in below screenshot.

    165185-get-call.png

    We will get Response as shown above.

    We we want to update this and following instances of a recurring event in Outlook Calendar.

    We have to use below patch method for the same.

    165241-patch-call.png

    In above PATCH method we have tried to edit 2 properties for recurring event shown in red box i.e. remiderMinutesBeforeStart and catergories

    remiderMinutesBeforeStart is set to 15 and catergories is set to "Blue category".

    So based on our recurring event pattern i.e. daily, weekly, monthly etc. and range we can decides parameters for recurrence property. After performing above PATCH call our calendar was appearing in blue color as shown below and we are getting notification 15 minutes before starting our call.

    165251-blue-colored-calendar.png

    So as per our requirement we can update this and following instances of a recurring event in Outlook Calendar..

    Hope this helps.

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


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.