2

How can I add a recurring event with exceptions using the Microsoft Graph API? Is this possible in Microsoft Graph at all?

Edit:

For instance, I want to create an event that will take place every Monday, starting 07/05/2021, but that will not occur on 07/12/2021. I already know how to create the recurring event, but I don't know how to create it with this exception.

Marc LaFleur
  • 31,987
  • 4
  • 37
  • 63
  • What do you mean when you say with exceptions? Have you checked [Create recurring event](https://learn.microsoft.com/en-us/graph/api/user-post-events?view=graph-rest-1.0&tabs=http#example-3-create-a-recurring-event) and [patternedRecurrence](https://learn.microsoft.com/en-us/graph/api/resources/patternedrecurrence?view=graph-rest-1.0) specifications – Danstan Jul 06 '21 at 09:19
  • I mean that some dates have been removed from the recurring event. I can have an event every Monday, except in the date 07/12/21. I've read these docs, but there is nothing about this subject in them. There is something about query, but not about how to create exceptions (https://learn.microsoft.com/en-us/graph/api/event-list-instances?view=graph-rest-1.0&tabs=http). – Siddhartha Argollo Jul 06 '21 at 19:27

1 Answers1

1

You first need to find the correct Event Instance you want to change.

/events/{id}/instances?startDateTime={dateTime}&endDateTime={dateTime}

This will return a list of instances within the specified date range. You then parse the list for the specific instance you want to obtain its unique id and delete it like any normal event.

Marc LaFleur
  • 31,987
  • 4
  • 37
  • 63
  • 1
    Thanks, Marc. I was hoping to create the event already with the exceptions, but that's better than nothing. – Siddhartha Argollo Jul 07 '21 at 18:29
  • @Marc I used that API it's working but it is returning only 10 instances of the recurring series, not all what i can do to get all instances in the specified date range? – Ritik Joshi Sep 21 '22 at 09:24