Query ListItems in Batches – SharePoint Online

CSOM 5000+ items get error

I have this application, in CSOM, which used to get the entire ListItems of a SharePoint List at one go to perform certain operations. All was well and good, until, I exported a brand new SharePoint List from Excel. The List had around 5400 items (>5000). When I tried to fetch all of its items, in the same way, I received the following error:

The attempted operation is prohibited because it exceeds the list view threshold enforced by the administrator

Read More »