PnP Export Modern pages with GetProvisioningTemplate

Copper Contributor



I'm currently working the provisioning part of PnP. I created a template subsite which I would like to use to provision a new subsite. I create a provisioning template with the GetProvisioningTemplate method on a Web object. It creates the xml but it doesn't include any pages.

I tried using the ProvisioningTemplateCreationInformation HandlersToProcess and included the pages and page content. But I only get my home.aspx as a ClientSidePage in the xml.


When applying the xml to the new subweb I get the following error: Page Home.aspx is not a \"modern\" client side page. I get this because it need a property ClientSideApplicationId which isn't exported.


Is there any way to export the pages and include them in my template?





3 Replies

It will only include welcome page of web. 

For other pages, you need to manually add in xml file before apply.

Even on the welcome page I get an exception. Is there any way to set the ClientSideApplicationId property to resolve this error?


Whats the best way to export the other pages (client side pages and wiki pages) and include them in the xml?


Hi @Sen Verleysen,


Check out this blog post by Joao Ferreira on how to export all pages 

Hope it helps