How to Fix The Attempted Operation Is Prohibited Because It Exceeds the List View Threshold
🔍 WiseChecker

How to Fix The Attempted Operation Is Prohibited Because It Exceeds the List View Threshold

When working with large SharePoint lists or libraries, you may see the error: “The attempted operation is prohibited because it exceeds the list view threshold.” This error stops you from sorting, filtering, or viewing all items in a list that has more than 5,000 items. The list view threshold is a SharePoint performance safeguard that limits how many items can be processed in a single database query. This article explains why the threshold exists and provides step-by-step methods to resolve the error so you can work with large datasets.

Key Takeaways: How to Work Around the List View Threshold

  • Create indexed columns: Adding an index to a column lets you filter on that column without hitting the 5,000-item limit.
  • Use views with filters: A view that filters items below the threshold runs without error, even if the list has more than 5,000 items total.
  • Increase the threshold temporarily: Site collection administrators can raise the limit in SharePoint admin center settings for specific site collections.

ADVERTISEMENT

Why SharePoint Enforces a List View Threshold

SharePoint stores list and library data in SQL Server databases. When you open a list, SharePoint runs a database query to retrieve the items. If that query returns more than 5,000 items, the database locks the table during the operation. This lock can slow down or block other users from accessing the same list. To prevent this, SharePoint sets a default list view threshold of 5,000 items per query.

The threshold applies to all list operations: viewing all items, sorting, filtering, grouping, and using lookup columns. If your list has 10,000 items and you try to view the default “All Items” view without any filter, you get the error. The threshold is not a hard limit on list size. You can store millions of items in a list. The limit is on how many items can be returned in a single database operation.

The error appears in several scenarios:

  • Opening a list that has more than 5,000 items
  • Sorting or filtering a column that does not have an index
  • Using a lookup column that references a list with more than 5,000 items
  • Running a workflow or Power Automate flow that queries a large list

Methods to Fix the List View Threshold Error

Method 1: Create an Indexed Column and Use a Filtered View

The most reliable fix is to add an index to a column and then create a view that filters on that column. This reduces the number of items returned by each query to below 5,000.

  1. Identify a column to index
    Choose a column that you frequently use for filtering, such as Title, Created, or a custom choice column. The column should have many unique values. Avoid indexing columns with low uniqueness like Yes/No or a small choice list.
  2. Add the index to the column
    Go to the list settings. Under Columns, select the column you want to index. Scroll to the bottom of the column settings page and click “Indexed” in the “Allow indexing of this column” section. Click “Create Index.” If the column already has an index, you will see “Delete Index” instead.
  3. Create a new view that filters on the indexed column
    In the list, click the drop-down arrow next to the view name and select “Create new view.” Choose a view type like Standard view. Give the view a name such as “Filtered Items.” In the Filter section, configure a filter that uses the indexed column. For example, set Title is greater than A. This filter returns only a subset of items. Save the view.
  4. Open the new view
    Switch to the filtered view. The error should no longer appear because the query now returns fewer than 5,000 items.

Method 2: Sort by an Indexed Column

If you only need to sort a large list, you can sort by an indexed column. Sorting by a non-indexed column triggers the threshold error.

  1. Confirm the column has an index
    Follow the steps in Method 1 to add an index to the column you want to sort by.
  2. Sort the list using the column header
    Click the column header to sort ascending or descending. SharePoint uses the index to perform the sort without hitting the threshold.

Method 3: Increase the List View Threshold (Admin Only)

Site collection administrators can raise the threshold from 5,000 to a maximum of 20,000 items. This does not remove the limit entirely but gives more room for larger queries.

  1. Open SharePoint admin center
    Go to admin.microsoft.com and navigate to SharePoint admin center. Under Sites, select Active sites.
  2. Select the site collection
    Click the site collection name that contains the large list. In the settings panel, click Policies.
  3. Adjust the list view threshold
    Under List View Threshold, enter a value between 5,001 and 20,000. Click Save.
  4. Test the list
    Return to the list and try the operation that previously failed. The error should be resolved if the query now returns fewer than the new threshold.

ADVERTISEMENT

If the Error Persists After the Main Fix

Lookup Column Threshold Error

If you have a lookup column that references a list with more than 5,000 items, you may see the error even if the current list is small. The lookup column must query the target list. To fix this, add an index to the lookup column in the source list, or reduce the number of items in the target list by archiving old items.

Folder Navigation in Large Libraries

When using folders in a library with more than 5,000 items, you may get the error if a folder contains more than 5,000 items. Move items into subfolders so no folder exceeds the threshold. Alternatively, use metadata navigation with indexed columns instead of folders.

Power Automate or Workflow Failures

Automations that query a large list may fail with this error. In Power Automate, use the “Get items” action with a filter query that uses an indexed column. For example, use a filter like “Title ge ‘A'” to limit the result set.

Method Effort Level Best For
Indexed column + filtered view Low Users who can filter data by a common column
Sort by indexed column Low Users who need to sort without filtering
Increase threshold (admin only) Medium Site collections with occasional large queries

The list view threshold error is a safeguard, not a bug. By adding indexes and using filtered views, you can work with lists of any size. Start by indexing a column you filter on most often. If you are an admin, consider raising the threshold only after testing, because a higher threshold increases database lock risks. For persistent issues with lookup columns or folders, reorganize your data structure to stay within the limit per query.

ADVERTISEMENT