Forum Discussion

RamBhajan's avatar
RamBhajan
Copper Contributor
May 26, 2023
Solved

few queries regarding Site Script and Site template

Hello All,

 

I have visited few relevant forums to check the latest updates on few queries (mentioned below) but all were old posts.

 

I have requirements to provide site template to end users so that they can create similar modern sites in SharePoint online. 

 

AFAIK, there are 2 ways to implement it - 1. Site Script & Site template 2. PnP Site Provisioning

(Please let me know if any other)

 

In this requirement there are few queries I have:

1. May we include SP list with data as template. 

2. May we include Power Apps or any WebPart in page as template.

3. Can we apply site template while creating the site OR first need to create the site and then apply template. What is the latest way to do this.

 

Please help me on this. 

 

  • RamBhajan 

    1. You can create SP lists with site script but cannot move data with it.
    2. Configuring web parts on sites page still not possible using site scripts
    3. If you are creating a new site using PnP PowerShell or CLI for Microsoft 365, you can apply site design/template while creating a new site itself. If you want to apply site template via SharePoint UI, you will have to first create a site and then apply custom site template.

    Check JSON schema for currently available actions and verbs using site scripts: Site template JSON schema 


    Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

1 Reply

  • RamBhajan 

    1. You can create SP lists with site script but cannot move data with it.
    2. Configuring web parts on sites page still not possible using site scripts
    3. If you are creating a new site using PnP PowerShell or CLI for Microsoft 365, you can apply site design/template while creating a new site itself. If you want to apply site template via SharePoint UI, you will have to first create a site and then apply custom site template.

    Check JSON schema for currently available actions and verbs using site scripts: Site template JSON schema 


    Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

Resources