Using the Graph CLI, How can I find all events in a date range *including* recurring instances?

Bertalan, Tom 0 Reputation points
2025-02-13T16:34:08.3966667+00:00

I'm using a command like

mgc users events list --user-id me --filter "start/dateTime ge '2025-02-13T05:00:00Z' and end/dateTime le '2025-02-14T05:00:00Z'" 

to retrieve as JSON my events for a day. However, this only surfaces events that are unique to that day, or first instances of recurring events. How can I also get recurrences to be included?

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

1 answer

Sort by: Most helpful
  1. Yakun Huang-MSFT 9,940 Reputation points Microsoft Vendor
    2025-02-14T02:24:07.23+00:00

    Hello Bertalan, Tom,

    Thank you for reaching out to Microsoft Support!

    For recurring events, you can use the List instances method, which lists instances of an event for a specified time range. The request command is as follows:

    mgc users events instances list --user-id {user-id} --event-id {event-id} --start-date-time "2019-04-08T09:00:00.0000000" --end-date-time "2019-04-30T09:00:00.0000000" --select "subject,bodyPreview,seriesMasterId,type,recurrence,start,end"
    

    See this document for more details:

    https://learn.microsoft.com/en-us/graph/api/event-list-instances?view=graph-rest-1.0&tabs=cli

    Hope this helps.

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


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.