8

I'm currently using the Microsoft Graph API to sync calendar events to my local application. On my end, I don't care to save each individual occurrence in a series, but prefer instead to just save the series master and then extrapolate out the instances of the series myself. For this reason, I am using the /me/events call rather than the /me/calendarView call.

My problem is when editing a single occurrence in a series. After editing the single occurrence, I make the /me/events call and I can see the newly added "Exception" type -- which is great. However, I don't see how to relate that new event back to which occurrence was changed to cause the exception.

For example, if I have a weekly meeting on Monday at noon, and I change today's meeting from noon to 2:00, it's pretty easy to tell that today's meeting is the one that changed. But if I change today's meeting to Friday, how can I tell that it was today's meeting that changed and not next week's? Keep in mind that I am only storing the master, and not every single calendarView occurrence.

Another example is if I delete an occurrence. In this case, the /me/calendarView call will simply not return that occurrence anymore. No exception type is generated. And the series master returned from the /me/events call doesn't change at all to indicate that a date is missing.

The format that I'm used to is something like the iCal/vCal format, where there is a start date, end date, and then a list of exception dates. Using that format, I can easily tell from the series master which dates to skip, without needing to "render" the entire occurrence and skip the exceptions. And if an occurrence is deleted, it is added to the EXDATE list and then it is never considered on rendering. Does the Microsoft Graph API not have an easy way to see these changed/deleted occurrences?

Marc LaFleur
  • 31,987
  • 4
  • 37
  • 63
Bobby
  • 119
  • 11
  • hi, how do you edit/delete a single occurrence in the first place? Trying to do the same thing but can't find any docs or examples on that so far. Appreciate any input on that. – vir us May 11 '20 at 11:14
  • Just click on one of the occurrences in your Outlook calendar and edit it. It will ask you if you want to edit the entire series or just the single instance. – Bobby May 12 '20 at 14:04
  • oh, I assumed you did that via graph api, that what I was looking for. Anyway, figured that out already – vir us May 12 '20 at 19:40
  • That's a legit question, @Bobby. I had gone through the similar situation recently, so ended up saving all the recurrences amid our customer was screaming at us saying it should be very easy to do. – Mukesh Kumar Sep 23 '20 at 20:28

2 Answers2

3

I was having a similar issue, but I think I've now realized that Microsoft does not allow recurring events to move later than the next instance, or earlier than the preceding one (at least while using Outlook calendar in the browser). So you can always assume that the 3rd event is 3rd in the series, the 4th is 4th, etc.

So as long as you know the series number, you can locate it by getting all of the instances with /me/events/[event_id]/instances?startDateTime=[start_date_time]&endDateTime=[end_date_time].

The error in Outlook Calendar when I do this isn't very clear, so maybe something else is up, but I am able to move the exception events otherwise. Unfortunately, I'm not sure if there's a definite way to know what end_date_time to use, as events can be moved indefinitely later.

-1

Based on the response object from the event marked as an exception, you can use the seriesMasterId to relate the exception to its parent recurrence.

crice1988
  • 81
  • 1
  • 10
  • 1
    Thanks for your input. My problem, however, isn't with being able to relate the event to the master; it's with being able to relate the exception to which occurrence it's supposed to be replacing. – Bobby Oct 11 '18 at 21:17