sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Broken/corrupt SharePoint list column indexes across multiple tenant

Open advdberg opened this issue 8 months ago β€’ 5 comments

What type of issue is this?

Question

What SharePoint development model, framework, SDK or API is this about?

SharePoint CSOM

Target SharePoint environment

SharePoint Online

What browser(s) / client(s) have you tested

  • [ ] πŸ’₯ Internet Explorer
  • [ ] πŸ’₯ Microsoft Edge
  • [ ] πŸ’₯ Google Chrome
  • [ ] πŸ’₯ FireFox
  • [ ] πŸ’₯ Safari
  • [ ] mobile (iOS/iPadOS)
  • [ ] mobile (Android)
  • [x] not applicable
  • [ ] other (enter in the "Additional environment details" area below)

Additional environment details

No response

Issue description

As part of the software we create, we use SharePoint Online lists for storing data on the customer Microsoft 365 tenant. Some of them are exceeding the 5000 item threshold already for a long time. Back in the days we added column indexes to work around possible issues with these large lists abd ti be still able to query data by using those indexed columns, as long as the results are below the list view treshold.

This has worked perfectly fine for multiple years on all the tenants we connected to in the past, because we're respecting the known rules for these large lists. Now since a couple of weeks some tenants are starting to show failures in these lists. The failures we see:

  • Duplicate values can be added without any warning for indexed columns, even though unique values are enforced for these columns.
  • UI Filtering or searching by the indexed columns does not return (all) results. Only recent items are returned.
  • CSOM and REST queries filtering on Identifier fail to find (all) existing items. Only recent items are returned

It looks like the indexes are reset on a certain point in time as new items added are indexed and returned but older items seem to not be part of the index.

The only solution we currently see is removing the column index from the list, wait untill it's fully removed (can take up to 5 minutes, depending the list item count), and re-add the index. After these steps it's fully working again and we haven't seen it happen again on these 'repaired' lists. The biggest disadvantage is that indexes for columns which enforce unique values cannot be removed. Then you first have to disable the unique value enforcement. But this setting can only be re-enabled if the list contains less than the 5000 listitems. Our only solution to this is to temporarily recycle items from this list untill there are less than 5000 items, then fix the index and restore all items again.

Is this a known/by design issue? As this has never occured during the past 10+ years, it looks like something has recently changed or reset in this area.

The issue is also mentioned here by my colleague

advdberg avatar Mar 11 '26 13:03 advdberg

Hello @advdberg, Thank you for bringing this issue to our attention. We will look into it and get back to you shortly.
If you don’t receive a reply within two working days, please use this escalation form to escalate.

Ashlesha-MSFT avatar Mar 12 '26 05:03 Ashlesha-MSFT

@advdberg, To help us investigate whether this is a service-side indexing issue, could you please share a few additional details:

  1. Tenant region and approximate number of affected tenants
  2. Site URL and list template type (custom list, etc.)
  3. Total item count in the affected list
  4. Names of the indexed columns and whether they enforce unique values
  5. Whether compound indexes or lookup columns are present
  6. Example REST or CSOM query that fails to return older items
  7. A correlation ID and timestamp (UTC) from a failing request if available

Additionally, could you try the following step to see if the behavior changes: Go to List Settings β†’ Advanced Settings β†’ Reindex List

This will trigger SharePoint to rebuild the indexing metadata in the background and can sometimes resolve inconsistencies without removing/recreating the column indexes.

Ashlesha-MSFT avatar Mar 12 '26 17:03 Ashlesha-MSFT

@Ashlesha-MSFT Thanks for replying. We gathered some data based on your questions:

  1. We've seen it on 6 tenants so far, Both on EU and USA tenants.
  2. Example url of one of our affected testing environments: https://ctbteamtstenmt01.sharepoint.com/sites/ctbprovisioningconfig/Lists/cusInstancesDetails/Testview.aspx. It's a custom list.
  3. Current item count is 21829
  4. Column 'ctbRelativeUrl' is the one with the 'Enforce unique values' enabled and has an index. Creating a new item in the list with a value (/sites/p365_P365RegressionTestSiteCollCommunicationEnglish3301) in this column which already exists (item with ID 2), still creates a new item causing the value to be duplicate.
Image
  1. We only use single column indexes, also no lookup columns are present in this list
  2. Example queries: 6.1 Sample CSOM CAML query which returns no item while it should return 1: /sites/p365_P365RegressionTestSiteCollCommunicationEnglish3301. We used the same query in the view 'Testview' which also returns no items. If we add a new duplicated item to the same list it appears in the view. 6.2 Sample CSOM CAML query which is returning 1502 items while it should return all items (and thus result in a threshold error while > 5000 results): NOTEXISTINGVALUECTB5000 We saw that when we recreate the index, the same query indeed results in a threshold error, as expected.
  3. Correlation ID: "479000a2-90df-b000-d453-3cdabd254720" Timestamp is about this, while I cannot find the exact one: 2026-03-16 13:30:00 UTC

Just triggered a reindex of the list, we will monitor this to see whether it impacts the behavior. We thought this was only reindexing in terms of Search so we didn't try this before.

advdberg avatar Mar 16 '26 13:03 advdberg

@Ashlesha-MSFT updated correlation ID and timestamp, retrieved from Fiddler trace: TraceCorrelationId: 599100a2-b09d-b000-d453-3224a2ac0cda Date: Mon, 16 Mar 2026 13:49:34 GMT

advdberg avatar Mar 16 '26 13:03 advdberg

@Ashlesha-MSFT any news on this?

advdberg avatar Apr 13 '26 12:04 advdberg