I read the documentation twice over (https://learn.microsoft.com/en-us/graph/filter-query-parameter), looked at countless blog posts, can't find a way to write this simple query.
I'm trying to retrieve a set of shifts that started in a range specified between two dates.
Documentation on filter lets me know that the "and" operator is supported, but when I craft my query such as this :
https://graph.microsoft.com/v1.0/teams/<MY TEAM ID>/schedule/shifts?$filter=sharedShift/startDateTime%20ge%202023-10-18T00:00:00.000Z%20and%20sharedShift/startDateTime%20%20le%202023-10-19T00:00:00.000Z
i get a 400 "bad request" :
{
"error": {
"code": "BadRequest",
"message": "A property is allowed to appear at most once in the $filter query.",
"innerError": {
"date": "2023-10-19T15:25:23",
"request-id": "9bbe42bd-bbfc-4ecb-88c4-178e9010a9f1",
"client-request-id": "9bbe42bd-bbfc-4ecb-88c4-178e9010a9f1"
}
}
}
Why is that ? Is there another way to achieve the same result ?
One approach I tried is to the following, using the ending of the shift :
https://graph.microsoft.com/v1.0/teams/94d07dde-0161-407a-aee8-bd103039b618/schedule/shifts?$filter=sharedShift/startDateTime%20ge%202023-10-18T00:00:00.000Z%20and%20sharedShift/endDateTime%20%20le%202023-10-19T00:00:00.000Z
but this is not consistent. Any suggestions ?