Graph API list instances doesn't return all the events listed in Outlook calendar

Sherin Josephin 1 Reputation point
2022-05-06T06:07:38.263+00:00

I have a specific scenario for the recurring meetings. I have created recurring meetings for 5 days in outlook for the upcoming week (~ 5 occurrences). I updated one of the individual meeting time and when I query using this URL - /users/{id | userPrincipalName}/calendar/events/{id}/instances?startDateTime={start_datetime}&endDateTime={end_datetime} I get all the 5 instances of a single recurring meetings with correct date and time.

Again, I did update all the events in the series together and outlook showed it correctly. When i query the same endpoint, i got only 4 events instead of 5 events. The event which i earlier updated is missing from the list.

I tried that using graph API explorer as well but still facing the same issue. One individually updated event is missing from the response.

Steps I followed:

  • Created 5 occurrences of a recurrent meeting and API returns all 5 instances
  • Updated 1 instance date and time and API returning all 5 instances
  • Again updated all the instances of the recurring meeting and API return only 4 instances. The one updated earlier is missing from the response in this scenario.

Again if i do some update on that missing meeting from Outlook then it is reflecting in the API response. Combination of updates isn't working as expected. It is kind of issue. Kindly advise what to be done here asap.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,582 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Srinivasa Rao Darna 6,686 Reputation points Microsoft Vendor
    2022-05-10T15:49:48.29+00:00

    Hi @Sherin Josephin ,

    I tested this scenario and I am not able to reproduce this behavior.

    Hope you are using the startDateTime as start datetime of initial occurrence of the event and endDateTime as end datetime of final occurrence of the event.

    GET /me/events/{id}/instances?startDateTime={start_datetime}&endDateTime={end_datetime}  
    

    200638-838915-0.jpg

    https://graph.microsoft.com/v1.0/me/events/{id}/instances?startDateTime=2022-05-10T15:30:00.0000000&endDateTime=2022-05-14T17:00:00.0000000

    Initially I was using endDateTime as start datetime(2022-05-14T15:30:00.0000000) of final occurrence of recurring event, that returned me 4 results but after using endDateTime end datetime(2022-05-14T17:00:00.0000000) of final occurrence returned me all 5 results.

    References: event-list-instances

    Hope this helps,

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

    0 comments No comments

  2. Mike Kaply 6 Reputation points
    2022-07-18T17:25:50.833+00:00

    Instead of using the calendar/events API, use calendarview.

    So something like this:

    https://graph.microsoft.com/v1.0/me/calendars/{ID}/calendarview?startdatetime=ISODATE&enddatetime=ISODATE

    As you discovered, /events appears to query and use start/end to mean when the original date was created, but calendarview a uses the dates the event is happening.

    See:

    https://learn.microsoft.com/en-us/graph/api/user-list-calendarview


  3. Mohammed Nijim 1 Reputation point
    2022-09-16T22:05:55.063+00:00

    I am facing the same issue.

    test it on postman from
    https://graph.microsoft.com/v1.0/me/calendarview?startdatetime=2022-09-22T01:00:00&enddatetime=2022-09-24T23:59:59

    return events that are not returned from
    https://graph.microsoft.com/v1.0/me/calendarview?startdatetime=2022-09-01T01:00:00&enddatetime=2022-09-30T23:59:59

    … note the missing event was created on Gmail calendar and the user is an attendee

    0 comments No comments