0

I'm trying to use SharePoint rest API to get items from a SPO list. It has around 15K items. But I'm using filters and expecting less than 30 items in the result. It works fine when normal columns are used for filtering. But when I use people picker column, it throws the below error:

    <m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<m:code>-2147024860, Microsoft.SharePoint.SPQueryThrottledException</m:code>
<m:message xml:lang="en-US">The attempted operation is prohibited because it exceeds the list view threshold.</m:message>
</m:error>

Below is the query I used:

https://test.sharepoint.com/sites/SiteName/_api/web/lists/getbytitle('ListName')/items?$select=ID,Employee/EMail,Employee/Title,Employee/JobTitle,Employee/Department&$expand=Employee/Id&$filter=(Employee/email address removed for privacy reasons%27)

Could anyone help me fix this issue?

2 Answers 2

0

Indexing the affected column may help you, for more information check out Microsoft's support article on managing large lists:

Manage large lists and libraries

11
  • The column is already indexed.
    – Robin Roy
    Jul 22, 2022 at 15:43
  • Is the person column single value or multi value? Jul 22, 2022 at 15:45
  • It's a single value column.
    – Robin Roy
    Jul 22, 2022 at 15:51
  • Strange, documentation suggests that it's a supported column type for indexing. Have you tried only returning/selecting that people column in your query? Jul 22, 2022 at 15:54
  • _api/web/lists/getbytitle('listname')/items?$select=Employee/EMail&$expand=Employee&$filter=(Employee/EMail eq '[email protected]') - tried this and it did not work.
    – Robin Roy
    Jul 22, 2022 at 16:00
0

This is the fastest set-up I’ve got, & I’ve got it filtering on non-indexed columns with the HTTP call because I have a preceding ID filter limiting things to 5000 or less items per call before the other filters & it is within an Apply to each concurrently running for each batch of 5000 across the entire dataset. But it still takes 1-4 seconds with the kind of query you describe. https://powerusers.microsoft.com/t5/Community-App-Samples/Large-SP-List-Delegation-Workaround-App/td-p/2330721

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.