Share via

Cannot filer timecard's by date

Alfie Jones 6 Reputation points
2022-12-26T17:54:10.223+00:00

I'm unable to filter by clockOutEvent/dateTime using the api described here https://learn.microsoft.com/en-us/graph/api/timecard-list?view=graph-rest-beta&tabs=http

I'm using the js library to build the query with this filter:

.filter(`clockOutEvent/dateTime gt 2021-07-01`)  

I just receive the following error:

{"code":"BadRequest","message":"The entity property 'clockOutEvent/dateTime' and operationKind 'GreaterThan' is not allowed in $filter query.","innerError":{"date":"2022-12-26T17:42:23","request-id":"b059084f-1178-41ec-a8bc-48aa00e072c7","client-request-id":"556df27c-851a-81d3-63af-9181b2b6175d"}}

Microsoft Security | Microsoft Graph
{count} vote

1 answer

Sort by: Most helpful
  1. Bhanu Kiran 3,616 Reputation points
    2022-12-27T01:06:25.583+00:00

    Hello @Alfie Jones ,

    As per the error message, it seems like the query does not support 'GreaterThan' filter query parameter on clockOutEvent/dateTime property.

    Hope this helps.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.