PnP Provisioning Templates

PnP Provisioning Templates

The PnP Provisioning Engine is widely used across the SharePoint community and includes contributions from Microsoft engineers. Like Make, it uses XML-based templates, but it doesn’t include an admin interface for managing provisioning requests. Execution typically happens through tools such as PnP PowerShell.

Make supports PnP Provisioning Templates, allowing you to use them directly within the Make configuration process.

More information:
https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/introducing-the-pnp-provisioning-engine

Example

The following example shows what a PnP Provisioning Template looks like.
This template creates a subsite and provisions a list named SubList with two fields: FirstName and LastName.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<pnp:Provisioning xmlns:pnp="http://schemas.dev.office.com/PnP/2021/03/ProvisioningSchema">
  <pnp:Preferences Generator="PnP.Framework, Version=1.10.0.0, Culture=neutral, PublicKeyToken=0d501f89f11b748c" />
  <pnp:Templates ID="CONTAINER-TEMPLATE-44FD56202D634CE8A17A40DE6D17FA5E">
    <pnp:ProvisioningTemplate ID="TEMPLATE-44FD56202D634CE8A17A40DE6D17FA5E" Version="1" BaseSiteTemplate="STS#3" Scope="Web">
      <pnp:Properties>
        <pnp:Property Key="mvMakeBaseTemplate" Value="STS#3" />
      </pnp:Properties>
      <pnp:PropertyBagEntries>
        <pnp:PropertyBagEntry Key="WebTemplate" Value="SubSite-Demo" Overwrite="false" />
      </pnp:PropertyBagEntries>
      <pnp:Lists>
        <pnp:ListInstance Title="SubList" Description="Demo list on subsite" DocumentTemplate="" OnQuickLaunch="true" TemplateType="100" Url="Lists/SubList" EnableVersioning="true" MinorVersionLimit="0" MaxVersionLimit="50" DraftVersionVisibility="0" TemplateFeatureID="00bfea71-de22-43b2-a848-c05709900100" EnableFolderCreation="false" DefaultDisplayFormUrl="{site}/Lists/SubList/DispForm.aspx" DefaultEditFormUrl="{site}/Lists/SubList/EditForm.aspx" DefaultNewFormUrl="{site}/Lists/SubList/NewForm.aspx" ImageUrl="/_layouts/15/images/itgen.png?rev=47" IrmExpire="false" IrmReject="false" IsApplicationList="false" ValidationFormula="" ValidationMessage="">
          <pnp:ContentTypeBindings>
            <pnp:ContentTypeBinding ContentTypeID="0x01" Default="true" />
            <pnp:ContentTypeBinding ContentTypeID="0x0120" />
          </pnp:ContentTypeBindings>
          <pnp:Views>
            <View Name="{6851B998-1F38-438F-A6D5-9C5F8A0CE1F1}" DefaultView="TRUE" MobileView="TRUE" MobileDefaultView="TRUE" Type="HTML" DisplayName="All Items" Url="{site}/Lists/SubList/AllItems.aspx" Level="1" BaseViewID="1" ContentTypeID="0x" ImageUrl="/_layouts/15/images/generic.png?rev=47">
              <Query />
              <ViewFields>
                <FieldRef Name="LinkTitle" />
                <FieldRef Name="FirstName" />
                <FieldRef Name="LastName" />
              </ViewFields>
              <RowLimit Paged="TRUE">30</RowLimit>
              <JSLink>clienttemplates.js</JSLink>
              <CustomFormatter />
            </View>
          </pnp:Views>
          <pnp:Fields>
            <Field DisplayName="FirstName" Format="Dropdown" IsModern="TRUE" MaxLength="255" Name="FirstName" Title="FirstName" Type="Text" ID="{0e82bdc7-797b-4135-931d-67d881a6a3de}" SourceID="{{listid:SubList}}" StaticName="FirstName" ColName="nvarchar4" RowOrdinal="0" />
            <Field DisplayName="LastName" Format="Dropdown" IsModern="TRUE" MaxLength="255" Name="LastName" Title="LastName" Type="Text" ID="{d9df39ff-7382-41cf-8c81-c0efa219bba6}" SourceID="{{listid:SubList}}" StaticName="LastName" ColName="nvarchar5" RowOrdinal="0" />
          </pnp:Fields>
        </pnp:ListInstance>
      </pnp:Lists>
      <pnp:Features>
        <pnp:WebFeatures>
          <pnp:Feature ID="992f7f2f-1a54-4fb1-a29d-aca651e10c40" />
        </pnp:WebFeatures>
      </pnp:Features>
      <pnp:Header Layout="Standard" ShowSiteTitle="false" ShowSiteNavigation="false" />
    </pnp:ProvisioningTemplate>
  </pnp:Templates>
</pnp:Provisioning>

How to Use PnP in Make

Using PnP Provisioning in Make is straightforward:
Place the PnP XML directly into your configuration.xml instead of the Make XML format. Make will detect the schema and process the template accordingly.

If you want to explore the full list of elements, attributes, and capabilities, refer to the PnP Provisioning Schema:

https://github.com/pnp/PnP-Provisioning-Schema

What's on this Page