0

I would like to be able to get all the instances of a recurring event (versus getting all but the "master" event using events/id/instances) and, to do that, I'm thinking of using calendarView.

However, to do so I need to filter the calendarView by the seriesMasterId, which so far I have not been able to do - I always get an empty object as response. The solution in this question works fine for the query

$filter=seriesMasterId+ne+null

but, with a query like

$filter=seriesMasterId+eq+'{id}'

I always get the empty object response.

Am I missing something here, or am I trying to achieve something that, for some reason, cannot be done?

Ghelthon
  • 45
  • 1
  • 8

2 Answers2

0

Base on my test result, the seriesMasterId just have two choice(null or id),and the id which is not null will have the same value in the same query: { "@odata.etag": "","id": "", "subject": "Xaml Consulting Lunch", "seriesMasterId": "AAMkADQ5OWMzMGEwLTg4ZjktNDk1Ny05NzFmLWRhZjg4ODU0YzUwYwBGAAAAAACtqDzk9UzLSpZsdesjndr1BwCjlNm_4oJfQqC8bkoOkcE6AAAAVvspAADOQt_-TwFOSKPNYFfSAG7oAACPgVuHAAA=", "type": "occurrence" },{ "@odata.etag"", "id": "", "subject": "Canceled: Cosmos DB Experiment - Weekly ", "seriesMasterId": "AAMkADQ5OWMzMGEwLTg4ZjktNDk1Ny05NzFmLWRhZjg4ODU0YzUwYwBGAAAAAACtqDzk9UzLSpZsdesjndr1BwCjlNm_4oJfQqC8bkoOkcE6AAAAVvspAADOQt_-TwFOSKPNYFfSAG7oAAByPWvdAAA=", "type": "occurrence" }

The demo data from old officail docs also show the same result: https://learn.microsoft.com/en-us/previous-versions/office/office-365-api/how-to/sync-calendar-view

So we can guess, the PG have no further handle for the seriesMasterId, you can try the following filter: $filter=type eq 'occurrence'

Seiya Su
  • 1,836
  • 1
  • 7
  • 10
  • Filtering by 'ocurrence' will indeed result in recurring events, but all of them. If I have several recurring events, all of their instances would be returned, so this is really not the ideal solution for me, as I want to get **all** the instances of a recurring event. – Ghelthon Aug 06 '18 at 08:13
0

So, I kinda of went ahead of myself with this question. For some reason, I was under the impression that the query

https://graph.microsoft.com/v1.0/me/events/{event_id}/instances?(...)

Would return all the instances but the original master event, which is not the case. So, this query actually solves my issue.

Ghelthon
  • 45
  • 1
  • 8