SharePoint Online - Provisioning Pages using Site Templates and Site Scripts #9032
Replies: 2 comments
-
Hi Akshat, As far as I know Site Designs and Site Scripts cannot provision content on their own. Behind the scenes these templates are using the PnP provisioning engine to do that. The mechanism used by SharePoint internally for applying these templates is not available for us to use for custom templates. The templates are available here: The code for the service that applies the templates can he found here: You will therefore need to create your own PnP templating service/function. This is usually initiated by calling a Power Automate or Logic App workflow from the site script (there is a Site Script action for this). This would tigger an Azure Function or Runbook to apply the PnP template. |
Beta Was this translation helpful? Give feedback.
-
Please Refer #9040 |
Beta Was this translation helpful? Give feedback.
-
I want to create pages in the "Site Pages" library within a SharePoint Online site using site templates. After reviewing the official documentation available at (https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-json-schema), I have been unable to locate any documented actions specifically related to creating pages in a "Site Pages" library.
However, I have observed that when applying the out-of-the-box site templates provided by Microsoft(reference image below), certain pages are automatically provisioned in the "Site Pages" library, and one of these pages is set as the site's home page.
I would like to understand potential approaches to achieve this and/or would like to understand how Microsoft is doing it.
Beta Was this translation helpful? Give feedback.
All reactions