microsoft graph --> how to get all events of a day (also recurring events)

Daniel Baeuerlein 61 Reputation points
2022-11-08T07:23:03.203+00:00

Hi all,

how can i get all events of a specific user and a specific day?

I tried following:

https://graph.microsoft.com/v1.0/users/{some email}/calendarView?startdatetime={some date}&enddatetime={some date}

which works in principle but some events are not included:

  • One event where another person is organizer
  • two recurring events

I know that i can get recurring events this way

https://graph.microsoft.com/v1.0/users/{some date}/events/{event_id}/instances?startDateTime={some date}&endDateTime={some date}

but therefore i have to know the ID of the event.
But how can i know the ID of an event, if i even don't know the event itself?
I just have the users email, a startdate and an enddate.

So how can i get ALL events of a person at a specific day (range).

Why are events with another organizer also left out?

Thank you for your help

Best regards

Daniel

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,446 questions
{count} vote

3 answers

Sort by: Most helpful
  1. HarmeetSingh7172 4,811 Reputation points
    2022-11-10T22:23:18.967+00:00

    Hello @Daniel Baeuerlein

    Thanks for reaching out!

    I'm unable to replicate this issue using my test tenant. Using List CalendarView Endpoint, you can get the occurrences, exceptions and single instances of events in a calendar view defined by a time range.

    I'm able to get all the events in the API response which includes the events which are recurring in nature and the events in which the user is not the organizer.

    Endpoint to get events from a specific user on a specific day:
    https://graph.microsoft.com/v1.0/users/adelev@6b***gg.onmicrosoft.com/calendar/calendarView?startDateTime=2022-12-14T00:00:00&endDateTime=2022-12-14T23:59:59

    You can always check the type property in API response to know the event type (whether it's a singleInstance or occurences event).

    Note: You can also use List Events followed by List Instances to get the instances (occurrences) of an event for a specified time range

    Please verify the same at your end and if the issue still persists, then I would suggest you raise a support case with Microsoft Graph, a Support Engineer will be able to assist you better. You can raise support ticket from
    http://aad.portal.azure.com/ or https://admin.microsoft.com/#/support/requests.

    Hope this helps.

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

    0 comments No comments

  2. Daniel Baeuerlein 61 Reputation points
    2022-11-11T05:49:42.837+00:00

    Hi,

    first: thank you for your answer.

    It's very strange.
    The problem seems to be in relation to the day.
    I have a repeating event for 08.11.2022, 09.11.2022 and 10.11.2022

    When i list the events for 09.11.2022 and 10.11.2022 all events are shown (also the repeating event and another event where user is not organizer - so everything is fine.
    But when i list events of 08.11.2022 the repeating event (and some others) are missing.

    Can it be that there is a max number of events to be displayed or that events?
    At 08.11.2022 i have 13 events and on the other days (which work) i have only 4to 6 events.

    Best regards

    Daniel


  3. Daniel Baeuerlein 61 Reputation points
    2022-11-14T06:56:04.157+00:00

    Hi,

    nope, unfortunately nothing with "NextLink", just a lot of "@odata.etag" e.g.

    => Microsoft\Graph\Model\Event Object ( [_propDict:protected] => Array ( [@odata.etag] => W/"IdYGdOIkaUS1EUlM7dIiOQAA/cR2qQ=="

    Best regards

    Daniel

    0 comments No comments