Forum Discussion

Ofer-Gal's avatar
Ofer-Gal
Copper Contributor
Jun 02, 2021

How do I overcome the 5000 threshold Of SPO lists

I have many libraries with way more than 5000 files. 

I am Building an SPFx web part and one of the action is to find documents in these libraries.

 

Using SP REST even when using top(10) I get the error:"The attempted operation is prohibited because it exceeds the list view threshold."

 

I tested the equivalent in Graph explorer but it returns:"The request is unprocessable because it uses too many resources"

 

So there is no way to programaticly find documents in libraries with over 5000 files?

Any one has a good advice. 

 

 

 

    • Ofer-Gal's avatar
      Ofer-Gal
      Copper Contributor

      Joe Stocker My problems are not with pure lists they work fine with more than 10,000 items so far.

      The big problem is with files in libraries some of which will have more than 5000 files and then I can't add more files or publish major version with JavaScript methods.

      I contact MS support and they have no solution but to structure libraries with folders of less than 5000 which is a big development challenge that adds nothing to the business needs.

       

      • Joe Stocker's avatar
        Joe Stocker
        Bronze Contributor
        One out of the box idea is to use a Microsoft Flow to take the list data and post it to a database that you can then programmatically query

Resources