SharePoint / SharePoint/sp-dev-docs

Unable to retrieve list items from the SharePoint site after updating the list name

Open
#10,643 5 comments 0 reactions 1 assignee View on GitHub

@Ashlesha-MSFT is already working on this.

Since Feb 13, 2026.

sharepoint-developer-support type:bug-suspected
Dominant language
PowerShell
Stars
1.4k
Forks
1.1k
Avg merge
4d 12h
Merged PRs (30d)
12

Description

Target SharePoint environment

SharePoint Online

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

💥 SharePoint Framework

Developer environment

Windows

What browser(s) / client(s) have you tested
  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)
Additional environment details

"@microsoft/sp-core-library": "1.21.1",
"@microsoft/sp-lodash-subset": "1.21.1",
"@microsoft/sp-office-ui-fabric-core": "1.21.1",
"@microsoft/sp-property-pane": "1.21.1",
"@microsoft/sp-webpart-base": "1.21.1",
"@pnp/logging": "^4.17.0",
"@pnp/sp": "^4.17.0",

Describe the bug / error

We created a SharePoint site collection with Polish set as the default language.

After that, we created a SharePoint list named “My List Data.”

We also developed an SPFx project for customization and implemented the following code to retrieve data from this SharePoint list.

import { spfi, SPFI, SPFx } from '@pnp/sp';
import '@pnp/sp/items';
import '@pnp/sp/lists';
import '@pnp/sp/webs';


const sp: SPFI = getSP();
const listData = await sp.web.lists.getByTitle("My List Data").items.select("*").top(5000);
console.log("listData:", listData);

Due to certain requirements, we needed to change the list name from “My List Data” to “My_List_Data”.

Accordingly, we have updated the code as shown below.

import { spfi, SPFI, SPFx } from '@pnp/sp';
import '@pnp/sp/items';
import '@pnp/sp/lists';
import '@pnp/sp/webs';


const sp: SPFI = getSP();
const listData = await sp.web.lists.getByTitle("My_List_Data").items.select("*").top(5000);
console.log("listData:", listData);

After renaming the list and updating the code accordingly, we are now facing the following issue.

"List 'My_List_Data' does not exist at site with URL 'https://contoso.sharepoint.com/sites/contoso'."

We have verified that the list already exists with the title “My_List_Data”.

Steps to reproduce

After renaming the list and updating the code accordingly, we are now facing the following issue.

"List 'My_List_Data' does not exist at site with URL 'https://contoso.sharepoint.com/sites/contoso'."

We have verified that the list already exists with the title “My_List_Data”.

Expected behavior

The behavior should remain consistent across all site collections and should not depend on any specific language settings.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.