As per lots of requests regarding Get-PnPProvisioningTemplate: Create SharePoint site template with multiple (classic experience) pages using PnP provisioning engine I implemented a small web interface for creating and applying SharePoint PnP provisioning templates.
Using the web interface you can submit jobs for creating new PnP provisioning templates and for applying the same.
Please install the
in your SharePoint Online App Catalog and add it to:
- the site you want to create a template from and
- the site collection, where you want to create a new site from your template
After successful installation just click on
and you will be redirected to the PnP Provisioning web interface.
To remove the app permissions later simply remove the app from your sites and site collections.
For user identification I use a cookie so don’t loose the little sweeties or you have to recreate your templates 😉
Unfortunately Microsoft disabled ACS authentication per default for tenants created during or after August 2020. So if you get an email like
Creation of sitetemplate ‘[your template name]’ failed with following exception: The running command stopped because the preference variable “ErrorActionPreference” or common parameter is set to Stop: The remote server returned an error: (401) Unauthorized / (403) Forbidden
once you try to create a site template, please enable ACS authentication by running the following commands using SharePoint Online PowerShell:
- To install SharePoint Online PowerShell on your system. You will get a warning if SharePoint Online PowerShell is already installed:
Install-Module -Name Microsoft.Online.SharePoint.PowerShell -Scope CurrentUser - To connect to your tenant:
Connect-SPOService -Urlhttps://[your tenant]-admin.sharepoint.com
- To enable ACS authentication:
Set-SPOTenant -DisableCustomAppAuthentication $false
Usually it takes about 5 minutes until the setting is completely applied to you tenant, but according to Microsoft documentation it can take up to 24 hours.
If you want to run the solution in your own environment feel free to ping me.
Have fun.
can you tell me how to resolve this issue?
Creation of sitetemplate ‘otakprojectsitetemplate’ failed with following exception: The running command stopped because the preference variable “ErrorActionPreference” or common parameter is set to Stop: The remote server returned an error: (403) Forbidden.
Hi Casey,
unfortunately Microsoft disabled ACS authentication per default for tenants created during or after August 2020. Please enable it by running the following commands using SharePoint Online PowerShell.
1. To install SharePoint Online PowerShell on your system. You will get a warning if SharePoint Online PowerShell is already installed:
Install-Module -Name Microsoft.Online.SharePoint.PowerShell -Scope CurrentUser
2. To connect to your tenant:
Connect-SPOService -Url
https://[your tenant]-admin.sharepoint.com
3. To enable ACS authentication:
Set-SPOTenant -DisableCustomAppAuthentication $false
Usually it takes about 5 minutes until the setting is completely applied to you tenant, but according to Microsoft documentation it can take up to 24 hours.
best regards
Stefan
HI Stephan,
I’m not seeing any site templates show up to apply once I get the confirmation.
Hi Casey,
did you get an email that your template was created successfully?
Furthermore you have to access the templates with the same browser profile you used for creation because the access to the templates is cookie-based.
br
Stefan
yes I received the email and used the same browser profile.
I can’t find a template “otakprojectsitetemplate”. Can you tell me the exact time when you started the template-creation? I would then scan the log for your job. We could also have a screen sharing session if you are interested.
br
I have the same issue Stephan, also if i want to install the template on a brand new site, what do i need to set for the parent site?
just root with https:///sites/
I made more the one template, one is called test, other one is called hr site personal. I used google chrome ( without in private session) for the browser.
I also received an email template was generated succesfully.
Hi Bart,
you have to set https://sites/yoursitecollection as the parent site. The new site will be created as https://sites/yoursitecollection/yournewsite
br
Stefan