Share via

SharePoint REST API Filter by Modified Date Issue

Anonymous
2023-11-22T10:56:43+00:00

Good day,

We have a SharePoint document library that has more than 5000 items. We are trying to retrieve a small set of files that we have calculated are less than 5000 based on a Modified date of earlier than September 17, 2023. We are using this API call:

https://[Tenant_URL]/sites/[Site_Collection]/_api/web/lists/getbytitle('Documents')/items?$select=ID,FileLeafRef,FileRef,Modified,ContentType,Author/Title,Editor/Title,Editor/EMail,FileSizeDisplay&$expand=Author,Editor&$filter=Modified lt '2023-09-17T00:00:00'&$orderby=Modified desc

But it throws a list view threshold error. We have confirmed that the column is Indexed and the criteria do not match more than 5000 files. <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>

Is there something we are missing to use Modified date column to filter a document library without getting ThrottledException?

Microsoft 365 and Office | SharePoint | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2023-11-22T11:25:50+00:00

    Dear Jervic Andres,

    Good day!

    I understand your concern, considering that it's related to SharePoint REST API Filter by modified date column, we would like to suggest you post your concern in the dedicated channel Microsoft Q&A Community with SharePoint tag to get the detailed help from the experts.

    The reason I ask you to post a new thread is that in Microsoft Community, we mainly focus on general queries in SharePoint, we have limited resources and very little knowledge about REST API, and in Microsoft Q&A Community you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction.

    Thanks for your patience and understanding. Have a good day!!

    Sincerely,

    Tina | Microsoft Community Moderator

    Was this answer helpful?

    0 comments No comments