SharePoint / SharePoint/sp-dev-docs

createSPList not updating the existing list

Open
#10,003 7 comments 0 reactions 1 assignee View on GitHub

@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
  1. Create a new Sharepoint List in another tenant from an existing list in one tenant using the createSPList site script
  2. Add a new column to the sharepoint in the source tenant
  3. Run the createSPList site script again
Expected behavior

It should update the existing list as mentioned in the note on the documentation here

https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-json-schema#create-a-new-sharepoint-list

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.