Web interface for the SharePoint PnP Provisioning Engine

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.

Click Create site template on the main page to create your first provisioning template.
Provide the necessary information for creation of the template and click Submit.
You will be redirected to the Confirmation page. Please click ok.
Back on the main page the Apply site template button will be enabled once your template is created. This may take SOME MINUTES depending on the size of your source site and the general system load.
Provide the necessary information for creating a new site using your just created template and click Submit.
You are redirected to the Confirmation page. It may take some minutes until the creation of your new site is completed.

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:

  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.

If you want to run the solution in your own environment feel free to ping me.

Have fun.

8 thoughts on “Web interface for the SharePoint PnP Provisioning Engine

  1. 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.

    1. 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

    1. 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

        1. 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

  2. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *