Skip to content

List templates created from a list do not include Automate rules, and there is no way from CSOM to retrieve or create one #9875

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
2 of 9 tasks
marcus905 opened this issue Aug 18, 2024 · 3 comments
Assignees
Labels
Needs: Triage 🔍 Awaiting categorization and initial review. type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs. type:uservoice-request Enhancements & feature requests should be posted: http://aka.ms/sp-dev-uservoice

Comments

@marcus905
Copy link

Target SharePoint environment

SharePoint Online

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

SharePoint CSOM

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

  • CSOM v 16.1.25110.12000

Describe the bug / error

When creating a site template the information regarding Automate rules is not saved in the template, and recreating a list from a template will not copy it over. PnP uses the site script to retrieve and create any rule on a list, but has no way to save the content in a site script. There should be a way to save the rules with a switch (as done for the data) in the List.SaveAsTemplate() call or alternately a way to access, retrieve, create and execute site scripts to allow users to access "modern" features also via CSOM (as the underlying API is a REST API.

Steps to reproduce

  1. Save a template via List.SaveAsTemplate()
  2. Create a list specifying the previously created template in the ListCreationInformation object
  3. Open the old and new list in top bar -> Automate -> Rules -> Manage Rules, they do not match.

Expected behavior

The rules (as well as any modern features) can be selected to be saved in the template and subsequently recreated on template usage. Alternately, expose the site script retrieval and execute REST APIs in CSOM as they are already exposed and useable in PnP to circumvent the issue.

@marcus905 marcus905 added the type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs. label Aug 18, 2024
@VesaJuvonen VesaJuvonen added the Needs: Triage 🔍 Awaiting categorization and initial review. label Aug 27, 2024
@Ashlesha-MSFT
Copy link

Hello @marcus905,
Thank you for bringing this issue to our attention. We will look into it and get back to you shortly.

@Ashlesha-MSFT
Copy link

@marcus905,
This behavior is currently by design, as the List.SaveAsTemplate() method does not support saving Power Automate rules or other modern list features. Since this functionality isn't implemented yet, it would fall under a feature request rather than a bug.

To help improve the product, we recommend raising this request on the official SharePoint Feedback Portal so it can be reviewed by the engineering team: aka.ms/sp-dev-uservoice

@Ashlesha-MSFT Ashlesha-MSFT self-assigned this Jun 3, 2025
@Ashlesha-MSFT Ashlesha-MSFT added the type:uservoice-request Enhancements & feature requests should be posted: http://aka.ms/sp-dev-uservoice label Jun 3, 2025
@marcus905
Copy link
Author

@marcus905, This behavior is currently by design, as the List.SaveAsTemplate() method does not support saving Power Automate rules or other modern list features. Since this functionality isn't implemented yet, it would fall under a feature request rather than a bug.

To help improve the product, we recommend raising this request on the official SharePoint Feedback Portal so it can be reviewed by the engineering team: aka.ms/sp-dev-uservoice

Hi, but there is also no way to manually edit those via a CSOM API. That's probably a bug, as API should have feature parity with UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Triage 🔍 Awaiting categorization and initial review. type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs. type:uservoice-request Enhancements & feature requests should be posted: http://aka.ms/sp-dev-uservoice
Projects
None yet
Development

No branches or pull requests

3 participants