Provisioning Existing site with selected SharePoint objects

%3CLINGO-SUB%20id%3D%22lingo-sub-69193%22%20slang%3D%22en-US%22%3EProvisioning%20Existing%20site%20with%20selected%20SharePoint%20objects%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-69193%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20All%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20like%20to%20know%20if%20there%20a%20way%20to%20update%20an%20existing%20sub%20site%20(with%20only%20few%20selected%20SharePoint%20Objects)%20using%20provisioning%20framework.%20We%20have%20this%20case%20for%20SharePoint%20Online%20and%20CSOM%20(with%20.NET)%20Provisioning.SubSiteCreationApp.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20scenario%20is%20something%20like%20this%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3COL%3E%3CLI%3E%3CP%3EWe%20have%20created%20a%20site%20(of%20Team%20site%20type)%20with%20required%20settings%20like%20color%20theme%2C%20custom%20document%20library%20and%20folders%20in%20side%20the%20doc%20library.%3CBR%20%2F%3Ee.g.%3CBR%20%2F%3E..%2Fdoclib1%2FTestfolder1%3CBR%20%2F%3E...%2Fdoclib1%2FTestfolder2%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3ECreated%20custom%20site%20template%20of%20the%20above%20site%20and%20imported%20it%20to%20a%20new%20site%20collection%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3EUsing%20%22Provisioning.SubSiteCreationApp%22%20and%20site%20template%20we%20have%20created%20new%20sub%20sites%20(e.g.%20TestSiteCollection%2FSubSite1%3CBR%20%2F%3ETestSiteCollection%2FSubSite2%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3ENow%20we%20have%20a%20requirement%20to%20update%20site%20(created%20in%20step%231)%2C%20to%20add%20new%20folder%20in%20custom%20doc%20library%3CBR%20%2F%3E..%2Fdoclib1%2FTestfolder3%3C%2FP%3E%3C%2FLI%3E%3C%2FOL%3E%3CP%3ENow%20the%20question%20here%20is%2C%20how%20to%20update%20the%20already%20created%20sub%20sites%20(SubSite1%20and%20SubSite2)%20to%20have%20new%20folder%20(Testfolder3)%20%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-69216%22%20slang%3D%22en-US%22%3ERe%3A%20Provisioning%20Existing%20site%20with%20selected%20SharePoint%20objects%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-69216%22%20slang%3D%22en-US%22%3E%3CP%3EIf%20it%20was%20just%20content%20like%20that%2C%20maybe%20look%20at%20a%20content%20migration%20tool%20otherwise%20with%20PnP%20you%20do%20have%20the%20option%20with%20the%20ProvisioningTemplate%20to%20specify%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FSharePoint%2FPnP-Sites-Core%2Fblob%2Fmaster%2FCore%2FOfficeDevPnP.Core%2FFramework%2FProvisioning%2FModel%2FHandlers.cs%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EHandlers%20%3C%2FA%3Ewhich%20only%20apply%20certain%20elements%20to%20the%20site%2C%20i.e.%20Lists%2C%20Files%2C%20Pages%26nbsp%3Band%20in%20your%20site%20provisioning%20XML%20template%2C%20update%20the%20section%20for%20%3CFILES%3E%3C%2FFILES%3E%20section%20for%20what%20should%20be%20added.%20You%20could%20also%20look%20at%20creating%20a%20custom%20extensibility%20handler%20for%20the%20PnP%20provisioning%20framework.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20heard%20the%20latest%20version%20(%3CA%20href%3D%22https%3A%2F%2Fdev.office.com%2Fblogs%2FPnP-May-2017-Release%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EMay%202017%3C%2FA%3E)%20of%20the%20PnP%20CSOM%20Core%20and%20Provisioning%20engine%2C%20the%20base%20templates%20have%20been%20updated%20to%20be%20used%20in%20delta%20handling%2C%20but%20haven't%20tested%20that%20yet.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Visitor

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