Reputation: 132
I want to filter my tasks which are currently active(not completed). I am using microsoft graph api. I get all my tasks and I found that if I mark task complete it is adding date to completedDateTime property. If task is not completed then it's completedDateTime is null. so I try to get task which has completedDateTime eq null but it is not working. so is there any why to check my active task which are not completed?
I have user v1.0 and beta both none of them are working. After lot of struggle get https://github.com/microsoftgraph/microsoft-graph-docs/issues/239 link which says that null check is possible with beta I tried it and it is working. but null check is not working with my query.
Query where null check working:
GET https://graph.microsoft.com/beta/users?$count=true&$select=id,displayName,surname&$filter=surname eq null
Content-type: application/json
ConsistencyLevel : eventual
Authorization: Bearer {{access_token}}
My query where null check not working:
GET https://graph.microsoft.com/beta/me/planner/tasks?$count=true&$select=planId,title,completedDateTime&$filter=completedDateTime eq null
Content-type: application/json
ConsistencyLevel : eventual
Authorization: Bearer {{access_token}}
I have also tried with percentComplete parameter. If it is 100 means task is completed but it also not working.
GET https://graph.microsoft.com/beta/me/planner/tasks?$count=true&$select=planId,title,percentComplete,completedDateTime&$filter= percentComplete ne 100
Content-type: application/json
ConsistencyLevel : eventual
Authorization: Bearer {{access_token}}
Upvotes: 0
Views: 4870
Reputation: 20625
According this filtering is not supported and unfortunately it is not described in the documentation which properties support filtering.
I have tested filtering and it is not possible to filter tasks by any property. It always returns all records.
Similar issue:
Upvotes: 2