Provisioning Existing site with selected SharePoint objects

Copper Contributor

Hello All,

 

I would like to know if there a way to update an existing sub site (with only few selected SharePoint Objects) using provisioning framework. We have this case for SharePoint Online and CSOM (with .NET) Provisioning.SubSiteCreationApp.

 

The scenario is something like this

 

  1. We have created a site (of Team site type) with required settings like color theme, custom document library and folders in side the doc library.
    e.g.
    ../doclib1/Testfolder1
    .../doclib1/Testfolder2

  2. Created custom site template of the above site and imported it to a new site collection

  3. Using "Provisioning.SubSiteCreationApp" and site template we have created new sub sites (e.g. TestSiteCollection/SubSite1
    TestSiteCollection/SubSite2

  4. Now we have a requirement to update site (created in step#1), to add new folder in custom doc library
    ../doclib1/Testfolder3

Now the question here is, how to update the already created sub sites (SubSite1 and SubSite2) to have new folder (Testfolder3) ?

1 Reply

If it was just content like that, maybe look at a content migration tool otherwise with PnP you do have the option with the ProvisioningTemplate to specify Handlers which only apply certain elements to the site, i.e. Lists, Files, Pages and in your site provisioning XML template, update the section for <pnp:Files /> section for what should be added. You could also look at creating a custom extensibility handler for the PnP provisioning framework.

 

I heard the latest version (May 2017) of the PnP CSOM Core and Provisioning engine, the base templates have been updated to be used in delta handling, but haven't tested that yet.

 

Thanks