SharePoint Document Issues

Fix SharePoint Online 5,000-Item View Threshold and API Access

Muhammad TalhaMuhammad Talha Nov 13, 2026 869 views

Question details

The user needs to locate a folder in a SharePoint Online document library containing about 6,000 root folders while working around the 5,000-item list view threshold, especially when API queries return incomplete results.

Product
SharePoint Online
Device & OS
not provided
Scenario
An information system or user queries a SharePoint Online document library with approximately 6,000 root folders and needs to retrieve the correct folder or item.
Observed behavior
Queries or views fail to display or locate the correct folder because the SharePoint Online 5,000-item list view threshold is exceeded.
Before you start

Before changing views or API queries, confirm whether the failure occurs in the SharePoint browser UI, in a custom API call, or both, and note the document library name and the columns used in the current view.

Solution 1Recommended

Create Indexed Columns and Filtered Views to Work Within the 5,000-Item Limit

Use this solution when the browser view or API query returns incomplete results from a large SharePoint Online list or library.

The 5,000-item threshold is a list view query limit, not a total storage limit. Indexing frequently filtered columns and adding filters reduces the number of items SharePoint must evaluate.

1
Open the SharePoint Online document library

In your browser, go to the SharePoint Online site and open the document library that contains approximately 6,000 root folders.

2
Create an indexed column

Click the Settings gear, select Library settings, choose Indexed columns, and create an index on a column you commonly use to filter folders, such as Name, Created, or a custom metadata column.

3
Create or modify a filtered view

On the library page, open the view selector, choose Create new view, and set a filter such as Modified greater than a specific date or a metadata column equals a known value to return fewer than 5,000 items.

4
Use filtered API queries

If you use the SharePoint REST API or Microsoft Graph, add $filter, $select, and $top query options so each query returns only the required records and does not evaluate all root folders at once.

Result: Filtered views and indexed columns let SharePoint retrieve only matching items, so the folder can be located without exceeding the threshold.
Free Microsoft Office alternative

Try WPS Office as a Free, Lightweight Alternative for SharePoint File Work

WPS Office is a free, lightweight office suite that opens Word, Excel, PowerPoint, and PDF files with high compatibility. It offers a familiar tab-based interface and smooth file migration when you work with documents downloaded from SharePoint Online or Microsoft 365.

Opens and edits Word, Excel, PowerPoint, and PDF files downloaded from SharePoint OnlineMaintains compatibility with Microsoft Office formats including .docx, .xlsx, and .pptxFree, lightweight installation with a familiar Microsoft Office-style interfaceSeamless migration from Microsoft Office and SharePoint-based document workflows
microsoft office alternative - wps office

Frequently Asked Questions

Is the SharePoint Online 5,000-item limit a total library size limit?

No. It is a list view query threshold. A library can store more than 5,000 items, but a view or query cannot evaluate more than 5,000 items at once. Use indexed columns, filtered views, and pagination to stay below the limit.

How do I create an indexed column in SharePoint Online?

Open the document library, click the Settings gear, select Library settings, and then choose Indexed columns. In modern SharePoint sites, you may need to open More library settings first, then create an index on the column you filter most often.

Why does my SharePoint Online API query return incomplete folder results?

The API query likely exceeds the list view threshold or lacks server-side query options. Review the endpoint, confirm permissions, index the filtered columns, and add $filter, $select, $top, and paging so each request returns only the required records.

Can WPS Office fix the SharePoint Online list view threshold?

WPS Office does not modify SharePoint Online thresholds. It can open and edit the Office documents you download from SharePoint with high compatibility, which helps when the threshold prevents you from browsing files inside a large library.

What is the best way to query more than 5,000 SharePoint items?

Use indexed columns and filtered views in the SharePoint UI. In REST or Microsoft Graph API calls, use $filter, $select, $top, and server-side paging so each request evaluates only a limited set of items.