SharePoint / SharePoint/sp-dev-docs
createSPList not updating the existing list
Open
@Ashlesha-MSFT is already working on this.
Since Apr 3, 2025.
Needs: Triage :mag:
sharepoint-developer-support
type:bug-confirmed
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?
Site designs & site scripts
Developer environment
macOS
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
Power Automate Flow SharePoint HTTP Connector
Describe the bug / error
When i run a createSPList site script on an existing list, it gives the follwoing error:
{
"ErrorCode": -2130575342,
"Outcome": "2",
"OutcomeText": "List with name already exists.",
"Target": null,
"TargetId": null,
"Title": "Create or update list ",
"Verb": "createSPList"
}
Steps to reproduce
- Create a new Sharepoint List in another tenant from an existing list in one tenant using the createSPList site script
- Add a new column to the sharepoint in the source tenant
- Run the createSPList site script again
Expected behavior
It should update the existing list as mentioned in the note on the documentation here
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.