question

BartekLachowiecki-7234 avatar image
0 Votes"
BartekLachowiecki-7234 asked saldana-msft edited

Filtering query by the field: recurrence/range/endDate

Hi, is it possible (using Graph Api) to filter query by recurrence/range/endDate event field?
For other data types it works, but for the endDate field, which is a Date object, I get this error:

 {
       "error": {
         "code": "BadRequest",
         "message": "Invalid filter clause",
         "innerError": {
           "date": "2022-05-05T11:41:34",
           "request-id": "ed64dfc2-976b-4019-b518-ed3d5bf8aeb4",
           "client-request-id": "395dbcf6-0d91-4a66-b6bd-7e7457c261f0"
         }
       }
 }

This is how my code looks like:

 graphClient.users().byId(userId))
                 .events()
                 .buildRequest()
                 .select("subject,organizer,createdDateTime,start,end,recurrence")
                 .filter("recurrence/range/endDate ge '2022-05-05'")
                 .get();

Would anyone help?
Thanks!













sharepoint-devmicrosoft-graph-calendarmicrosoft-graph-identitymicrosoft-graph-applicationsmicrosoft-graph-query-parameters
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

HarmeetSinghMSFT-7172 avatar image
1 Vote"
HarmeetSinghMSFT-7172 answered

Hi @BartekLachowiecki-7234

Based on my research, we can't apply filter on recurrence range. As you can see in below screenshot that the Recurrence property does not support filtering with Microsoft Graph API.
199314-recurrence-filter1.png

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


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.