Microsoft Graph - Error when using multiple filters for CalendarView
Asked Answered
S

1

3

I try to get a CalendarView which is filtered by both sensitivity and lastModifiedDateTime, but the graph API is failing when both filters are applied at once. If I run the query with one filter at a time, it works as expected. Through testing, I've discovered that it's lastModifiedDateTime that causes the error.

I haven't been able to find any documentation where it says, that when filtering on lastModifiedDateTime, only one filter is supported.

I run the queries through the Graph Explorer.

Query that fails:

2 filters applied, one is lastModifiedDateTime

https://graph.microsoft.com/v1.0/me/calendarview
  ?startdatetime=2018-10-28
  &enddatetime=2018-10-30
  &$filter=sensitivity eq 'normal' and lastModifiedDateTime ge 2018-10-29T00:00:00Z

It fails with the following error:

{
    "error": {
        "code": "ErrorInternalServerError",
        "message": "An internal server error occurred. The operation failed.",
        "innerError": {
            "request-id": "<GUID>",
            "date": "<DateTime>"
        }
    }
}

Queries that works:

Single filter on sensitivity

https://graph.microsoft.com/v1.0/me/calendarview
  ?startdatetime=2018-10-28
  &enddatetime=2018-10-30
  &$filter=sensitivity eq 'normal'

Single filter on lastModifiedDateTime

https://graph.microsoft.com/v1.0/me/calendarview
  ?startdatetime=2018-10-28
  &enddatetime=2018-10-30&
  $filter=lastModifiedDateTime ge 2018-10-29T00:00:00Z

2 filters, but not lastModifiedDateTime

https://graph.microsoft.com/v1.0/me/calendarview
  ?startdatetime=2018-10-28
  &enddatetime=2018-10-30
  &$filter=importance eq 'normal' and sensitivity eq 'normal'

I hope someone can help me, or clarify why it doesn't work with more than one filter when lastModifiedDateTime is involved.

Slapjack answered 31/10, 2018 at 15:46 Comment(0)
T
0

I realize this post is 5 years old, but thought I'd respond because there's at least one other StackOverflow question that leads here.

There is an option to report an issue using your Github account, by clicking on the '?' in the graph explorer top bar, and then clicking 'Report an Issue'.

Another issue I've encountered is where the select statement contains one of the fields you're trying to filter on. Graph Explorer flags that as a syntax error in the filter statement. I've reported that as an issue to Microsoft via github. The problem that @Søren Hansen mentions could be related to this.

Teacup answered 26/1 at 13:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.