How do I filter calendarView based on attendees?

Oskar Persson 40 Reputation points
2025-03-06T09:11:24.9+00:00

How do I filter calendarView based on attendees?

I want to do something similar to this:

https://graph.microsoft.com/v1.0/users/{userId}/calendars/{calendarId}/calendarView?startDateTime=2025-03-06T00:00:00&endDateTime=2025-06-06T00:00:00&$filter=attendees/any(a:a/emailAddress/address eq 'email@example.com')

But I'm getting this error:

{
    "error": {
        "code": "ErrorInvalidUrlQueryFilter",
        "message": "The query filter contains one or more invalid nodes."
    }
}
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,212 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Akhil Nasalwai - MSFT 740 Reputation points Microsoft External Staff
    2025-03-06T10:30:03.3166667+00:00

    Hello Oskar Persson,

    Thank you for reaching out to Microsoft!! Apologies for the inconvenience.

    For filtering the calendarView based on attendees, Unfortunately, this is not supported currently in Graph API and a possible work around might be retrieving the events within specific time range using the calendarView endpoint without applying the $filter parameter and then filter the events on the client side by checking if the attendees property contains desired email address.

    You can submit this feature request using this support link, which will be monitored by Microsoft team and make the enhancements to Graph API.

    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.