Get list items with filtering and paging not working - list view threshold error

Melanie Payne 21 Reputation points
2024-08-23T18:40:53.37+00:00

Hello,

I'm trying to get items from a large list with graph (using an http call). I'm filtering by a column (which is indexed) and the filtered result is over 5000 items, so I'm getting the list view threshold error, "The attempted operation is prohibited because it exceeds the list view threshold.".

My call: https://graph.microsoft.com/v1.0/sites/siteid/lists/listid/items?$top=100&$filter=fields/ProcessingStatus eq 'Processed'

But it seems that no matter what value I use for $top, it doesn't work.

Note that I can omit the $filter, get all items, and page through them, but once I include the $filter clause, it fails.

When I do the same query with CSOM, I'm able to use the "AllowIncrementalResults" on the CamlQuery object to successfully page through the more than 5000 filtered results that return.

Is there an equivalent in graph? Shouldn't the combination of $top and $filter work? Is there a special header I should include in the http call to allow paging?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,776 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Taylor 53,496 Reputation points
    2024-08-23T19:25:15.3866667+00:00

    Have you tried this query in the Graph Explorer?

    If you use a simpler filter does it work?

    Try adjusting your filter to be something like fields/ProcessingStatus eq 'Processed' instead. There are known issues where the graph API can behave sporadically if you pass "misformed" or unsupported OData parameters.


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.