PnP Provisioning
2 TopicsBest practice for provisioning content types in modern team sites
We have a requirement to provision sites using a form we are building in SPFX web part to restrict who can create specific sites. This process requires lot of inputs from user to provision site and set default values in the site before users start using it. At the moment we have below requirements: Use of Document Set. Inherit content types from Content type hub Provision lists and libraries Associate the content type to the lists and libraries Add default content to lists and libraries Problem: We are using site design scripts for provisioning lists and libraries. Using site design scripts, Creation of content types from hub is not available, enabling of site collection features not available, adding of content to lists and library is not available. Solution tried: 1. Azure Automation - Written PowerShell script and wait for time till content types are synced to newly created sites (~30 mins). After site content types are available we are adding them to lists and libraries. And then adding default content to lists and libraries. But, problem is time taking and not sure if content types are synced 30 mins, sometimes we see over an hour. Script is growing over time for additional customization etc. 2. Pnp Provisioning - Use PnP provisioning template to download the schema from a existing site and then use that template to create site. This one has its own issues. At the moment for production use I like to know what is the best practice people are following to provision a modern site which uses content type hub content types?? If we use same content type id, name and fields in it in PnP provisioning template, are there any problems when the site syncs from content type hub in next run? thanks -Praveen.5.1KViews0likes4CommentsPnP Provisioning limitations/quirks?
I have a site in which I created two lists (Leave Approver Exceptions and Leave Requests). Each list uses a custom content type defined in our content type hub in SharePoint Online (the default "Item" content type has been removed). Both lists have/use PowerApps-customized forms. I created a PnP Provisioning template from this site with the following command: Get-PnPProvisioningTemplate -Out LeaveApproval.xml I then created a new site and applied that template to it using this command: Apply-PnPProvisioningTemplate -Path LeaveApproval.xml The resulting site contains the two custom lists, but both still have the "Item" content type available and neither has the customized form. I didn't expect the custom forms to carry over, so that's not a big deal, but I did expect each list to have only the one defined content type. The custom views for each list are there, but one that was set up as a "Calendar" type view is now rendering as a standard (modern) list view (this is occurring in the original site as well, so it's not related to the provisioning process). Also, it seems that the Quick Launch menu has a bunch of duplicates. Each of the custom lists appears twice, as does the Site Contents link. Thinking this may be a glitch with using the .xml file type, I tried it again using: Get-PnPProvisioningTemplate -Out LeaveApproval.pnp The results (regarding the list content types and views) were the same, but this time, some entries in the Quick Launch (the lists and Site contents) actually got triplicated. Is this expected/normal behavior of the PnP Provisioning process? If so, I can work around it or try another solution. Basically, what I want is a convenient way to add those two custom lists with their defined views (and customized PowerApps forms, if possible) to an existing site without wreaking havoc. The two lists serve as data sources for a PowerApp, so it's important that they be exact duplicates to minimize the work required to reconnect them to a new copy of the App.1.6KViews0likes0Comments