Missing events when querying from Calendar API

Alex 0 Reputation points
2023-03-14T18:15:25.02+00:00

Hello,

I'm noticing that not all calendar events are returned when querying for events.

Using Graph Explorer, I used this query

https://graph.microsoft.com/v1.0/me/{canada-holidays-calendar-id}/events?$select=subject,start

Which returned:

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('d0418d55-79af-4f7f-8fab-239421c2ef1c')/calendars('AAMkADI1MWIxYjdmLWQxNGUtNGQ2OS05NDM0LTdjNTk0Yjg1YjlhYQBGAAAAAAAIvIPbe2IQQZqhtkkXQti2BwDia5Z645dpRo9RURaczGhiAAAAAAEGAADia5Z645dpRo9RURaczGhiAAABontjAAA%3D')/events(subject,start)",
    "@odata.nextLink": "https://graph.microsoft.com/v1.0/me/calendars/AAMkADI1MWIxYjdmLWQxNGUtNGQ2OS05NDM0LTdjNTk0Yjg1YjlhYQBGAAAAAAAIvIPbe2IQQZqhtkkXQti2BwDia5Z645dpRo9RURaczGhiAAAAAAEGAADia5Z645dpRo9RURaczGhiAAABontjAAA=/events?$select=subject%2cstart&$skip=10",
    "value": [
        {
            "@odata.etag": "W/\"4muWeuOXaUaPUVEWnMxoYgAAAZ5OMQ==\"",
            "id": "AAMkADI1MWIxYjdmLWQxNGUtNGQ2OS05NDM0LTdjNTk0Yjg1YjlhYQBGAAAAAAAIvIPbe2IQQZqhtkkXQti2BwDia5Z645dpRo9RURaczGhiAAABoWyIAADia5Z645dpRo9RURaczGhiAAABooAlAAA=",
            "subject": "Boxing Day Bank Holiday",
            "start": {
                "dateTime": "2026-12-28T00:00:00.0000000",
                "timeZone": "Pacific Standard Time"
            }
        },
        {
            "@odata.etag": "W/\"4muWeuOXaUaPUVEWnMxoYgAAAZ5OMA==\"",
            "id": "AAMkADI1MWIxYjdmLWQxNGUtNGQ2OS05NDM0LTdjNTk0Yjg1YjlhYQBGAAAAAAAIvIPbe2IQQZqhtkkXQti2BwDia5Z645dpRo9RURaczGhiAAABoWyIAADia5Z645dpRo9RURaczGhiAAABooAkAAA=",
            "subject": "Thanksgiving Day",
            "start": {
                "dateTime": "2026-10-12T00:00:00.0000000",
                "timeZone": "Pacific Standard Time"
            }
        },
        {
            "@odata.etag": "W/\"4muWeuOXaUaPUVEWnMxoYgAAAZ5OLw==\"",
            "id": "AAMkADI1MWIxYjdmLWQxNGUtNGQ2OS05NDM0LTdjNTk0Yjg1YjlhYQBGAAAAAAAIvIPbe2IQQZqhtkkXQti2BwDia5Z645dpRo9RURaczGhiAAABoWyIAADia5Z645dpRo9RURaczGhiAAABooAjAAA=",
            "subject": "Labour Day",
            "start": {
                "dateTime": "2026-09-07T00:00:00.0000000",
                "timeZone": "Pacific Standard Time"
            }
        },
        {
            "@odata.etag": "W/\"4muWeuOXaUaPUVEWnMxoYgAAAZ5OLg==\"",
            "id": "AAMkADI1MWIxYjdmLWQxNGUtNGQ2OS05NDM0LTdjNTk0Yjg1YjlhYQBGAAAAAAAIvIPbe2IQQZqhtkkXQti2BwDia5Z645dpRo9RURaczGhiAAABoWyIAADia5Z645dpRo9RURaczGhiAAABooAiAAA=",
            "subject": "Discovery Day (Yukon)",
            "start": {
                "dateTime": "2026-08-17T00:00:00.0000000",
                "timeZone": "Pacific Standard Time"
            }
        },
        {
            "@odata.etag": "W/\"4muWeuOXaUaPUVEWnMxoYgAAAZ5OLQ==\"",
            "id": "AAMkADI1MWIxYjdmLWQxNGUtNGQ2OS05NDM0LTdjNTk0Yjg1YjlhYQBGAAAAAAAIvIPbe2IQQZqhtkkXQti2BwDia5Z645dpRo9RURaczGhiAAABoWyIAADia5Z645dpRo9RURaczGhiAAABooAhAAA=",
            "subject": "New Brunswick Day (New Brunswick)",
            "start": {
                "dateTime": "2026-08-03T00:00:00.0000000",
                "timeZone": "Pacific Standard Time"
            }
        },
        {
            "@odata.etag": "W/\"4muWeuOXaUaPUVEWnMxoYgAAAZ5OLA==\"",
            "id": "AAMkADI1MWIxYjdmLWQxNGUtNGQ2OS05NDM0LTdjNTk0Yjg1YjlhYQBGAAAAAAAIvIPbe2IQQZqhtkkXQti2BwDia5Z645dpRo9RURaczGhiAAABoWyIAADia5Z645dpRo9RURaczGhiAAABooAgAAA=",
            "subject": "British Columbia Day (British Columbia)",
            "start": {
                "dateTime": "2026-08-03T00:00:00.0000000",
                "timeZone": "Pacific Standard Time"
            }
        },
        {
            "@odata.etag": "W/\"4muWeuOXaUaPUVEWnMxoYgAAAZ5OKw==\"",
            "id": "AAMkADI1MWIxYjdmLWQxNGUtNGQ2OS05NDM0LTdjNTk0Yjg1YjlhYQBGAAAAAAAIvIPbe2IQQZqhtkkXQti2BwDia5Z645dpRo9RURaczGhiAAABoWyIAADia5Z645dpRo9RURaczGhiAAABooAfAAA=",
            "subject": "Heritage Day (Alberta)",
            "start": {
                "dateTime": "2026-08-03T00:00:00.0000000",
                "timeZone": "Pacific Standard Time"
            }
        },
        {
            "@odata.etag": "W/\"4muWeuOXaUaPUVEWnMxoYgAAAZ5OKg==\"",
            "id": "AAMkADI1MWIxYjdmLWQxNGUtNGQ2OS05NDM0LTdjNTk0Yjg1YjlhYQBGAAAAAAAIvIPbe2IQQZqhtkkXQti2BwDia5Z645dpRo9RURaczGhiAAABoWyIAADia5Z645dpRo9RURaczGhiAAABooAeAAA=",
            "subject": "Civic Holiday (many provinces)",
            "start": {
                "dateTime": "2026-08-03T00:00:00.0000000",
                "timeZone": "Pacific Standard Time"
            }
        },
        {
            "@odata.etag": "W/\"4muWeuOXaUaPUVEWnMxoYgAAAZ5OKQ==\"",
            "id": "AAMkADI1MWIxYjdmLWQxNGUtNGQ2OS05NDM0LTdjNTk0Yjg1YjlhYQBGAAAAAAAIvIPbe2IQQZqhtkkXQti2BwDia5Z645dpRo9RURaczGhiAAABoWyIAADia5Z645dpRo9RURaczGhiAAABooAdAAA=",
            "subject": "Natal Day (Nova Scotia and PEI)",
            "start": {
                "dateTime": "2026-08-03T00:00:00.0000000",
                "timeZone": "Pacific Standard Time"
            }
        },
        {
            "@odata.etag": "W/\"4muWeuOXaUaPUVEWnMxoYgAAAZ5OKA==\"",
            "id": "AAMkADI1MWIxYjdmLWQxNGUtNGQ2OS05NDM0LTdjNTk0Yjg1YjlhYQBGAAAAAAAIvIPbe2IQQZqhtkkXQti2BwDia5Z645dpRo9RURaczGhiAAABoWyIAADia5Z645dpRo9RURaczGhiAAABooAcAAA=",
            "subject": "Orangemen's Day (Newfoundland and Labrador)",
            "start": {
                "dateTime": "2026-07-13T00:00:00.0000000",
                "timeZone": "Pacific Standard Time"
            }
        }
    ]
}

However, there are missing events here. Ex: Remembrance Day in November, or Christmas Days and New Year's Eve in December, and possibly others. However, these events do exist within my Outlook calendar as well as when queried by name.

https://graph.microsoft.com/v1.0/me/calendars/{canada-holidays-calendar-id}/events?$filter=subject eq 'New Year''s Eve'

I thought it could be a paging thing where the results are placed in later pages, so I decided to query for events in December 2026

https://graph.microsoft.com/v1.0/me/{canada-holidays-calendar-id}/events?$filter=start/dateTime ge '2026-12-01T00:00' and end/dateTime le '2026-12-31T23:59'

but it still only return the Boxing Day event above. In fact, when looking for events in December 2023 using the same query, it returned an empty list.

I queried for events within my personal calendar as well and noticed the same thing; certain events are missing while others that are outside of my time frame were included in the result. Some of these events are recurring events and some were from invitations that I accepted which I'm not sure how they would be treated.

So yeah, I'm not sure what's going on here, though I think the issue is most likely with how I'm querying these events. My ultimate goal is to be able to query for events in a calendar between some date time.

Thanks in advance.

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

1 answer

Sort by: Most helpful
  1. CharanyaB-MSFT 1,421 Reputation points Microsoft Vendor
    2023-03-15T08:20:58.9066667+00:00

    Hello @Alex,

    Thank you for reaching out!

    If you are using https://graph.microsoft.com/v1.0/me/{canada-holidays-calendar-id}/events?$select=subject,start API, Microsoft Graph may return multiple pages of data, so please use the @odata.nextLink property in the response that contains a URL to the next page of results. I can see there are 10 results in your response, so please use the @odata.nextLink property from your response to get the rest of the events.

    You can also use $top query parameter to specifically limit the page size in a request, $top=100 to get the top 100 events from your calendar.

    Alternately, you can also use list CalendarView API to query events in a calendar view defined by a time range. Try using the below API:

    https://graph.microsoft.com/v1.0/me/calendars/{canada-holidays-calendar-id}/calendarView?startDateTime={start_datetime}&endDateTime={end_datetime}

    Documentation reference:

    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.

    0 comments No comments