PnP Provisioning template using JSOM?

Microsoft

I have some javascript that creates a new sub-web but I would like the site to be a copy of an existing "template" site. I will eventually move this to TypeScript and a SharePoint Framework web part.

Is there any way of using the Provisioning Engine in javascript/typescript to do this?

2 Replies

As far as I know there is no javascript library for the PnP engine. PnP javascript library can be used to help you configure the new site but it doesn't have functionality to work based on a template file. 

 

There are a lots of other options but all involve using powershell or c# code:

 - Integrate with PnP partner pack

 - Populate a list with site info which than

    - is queried by a powershell script to perform provisioning

    - triggers a webhook or RER to perform the provisioning

 - etc.

 

You are probably looking for a clientside solution... Then your best bet is do all provisioning by code instead of using a template.

That's what I thought but wanted to ask just in case I was missing something. Thanks for the info!