microsoft-graph-apimicrosoft-graph-calendar

Update single event from recursive event using microsoft graph api


Is it possible to update a single event from a recursive event using Microsoft Graph API? if it is possible to update, please share a useful link.

I tried finding it in the official documentation but couldnt find how to change time of a single instance.


Solution

  • Take the id of recursive event (master series event id) and use it to get all event instances in specified time range

    GET https://graph.microsoft.com/v1.0/me/events/{master_series_event_id}/instances?startDateTime=2023-04-17T09:00:00.0000000&endDateTime=2023-04-20T09:00:00.0000000
    

    Find the event id of specific single instance and call the following endpoint to change the time

    PATCH https://graph.microsoft.com/v1.0/me/events/{instance_event_id}
    {
        "start": {
            "dateTime": "2023-04-18T11:15:00.0000000",
            "timeZone": "UTC"
        },
        "end": {
            "dateTime": "2023-04-18T11:45:00.0000000",
            "timeZone": "UTC"
        }
    }
    

    Resources:

    List event instances

    Update event