Error received on request with 400 status code - invalidRequest

Andrei Iuresi 5 Reputation points
2023-09-05T12:10:13.0566667+00:00
"&filter=fields/Task_Id eq {$task->id}"

{"error":{"code":"invalidRequest","message":"Field 'Task_Id' cannot be referenced in filter or orderby as it is not indexed. Provide the 'Prefer: HonorNonIndexedQueriesWarningMayFailRandomly' header to allow this}

===

I would like to mention that the system was working on 1 September, and the error appears on 4 September 2023.

I send the request in the header with HonorNonIndexedQueriesWarningMayFailRandomly and have the index in sharePoint on the Task_Id column and I also reindexed in sharePoint la Task_Id column

Something changed in "&filter=fields/Task_Id eq {$task->id}"

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,487 questions
{count} votes

Your answer

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