October 4th, 2016

PnP Templates Gallery – Open source provisioning templates

At Microsoft Ignite 2016, in Atlanta, we proudly announced the availability of the new “PnP Templates Gallery” portal, which is available at the following URL: https://templates-gallery.sharepointpnp.com.

The basic idea around this new portal, is to have a public and shared repository for PnP provisioning templates, which anybody can download and use for free. Moreover, we hope that many community members will like to share their own templates with the community. In the following figure, you can see the home page of the PnP Templates Gallery.

Front page of the PnP Template Gallery site with Featured template widget shown

The site is responsive and mobile-aware, and allows you to browse the templates, and to search for them based on few search criteria:

  • Category: see later what are the available categories
  • Target platform: can be SharePoint Online, SharePoint 2016, or SharePoint 2013
  • Scope: defines whether the template targets the root web of a Site Collection, a sub web, or it is a partial template that can be applied on any site
  • Rating: there is a rating model with values between 1 and 5 stars, which is based on the community feedbacks

About the categories, so far we decided to group templates into the following families:

  • Accounting
  • Business
  • Collaboration
  • Development
  • Document Management
  • Human Resources
  • IT Management
  • Others

Once you found a template that you like, you can simply download the .PNP Open XML package file and use it in your own environment or tenant. As you will see later in this article, the templates can also be used within the fresh new PnP Partner Pack 2.0.
At the time of writing this article, there are just a few templates available in the gallery. However, we do believe that soon there will be a lot of contents, thanks to the contribution from the whole community of Office 365 developers.

How to use the templates

If you simply want to use the templates, without having any additional components or tools in your environment, you can simply download the .PNP file from the detail page related to your chosen template.

Once you have downloaded the .PNP file, you can easily apply it to any target site just using the PnP PowerShell extensions, which are available together with setup instruction at the following URL: https://github.com/OfficeDev/PnP-PowerShell

For example, let assume that you have downloaded the “Curriculum Vitae Database” template (https://templates-gallery.sharepointpnp.com/template/curriculum-vitae-database). By using the following PowerShell syntax, you will be able to apply the template to a target site.


Connect-SPOnline http://<your-tenant>.sharepoint.com/sites/<your-target-site>
Apply-SPOProvisioningTemplate .CVDatabase.pnp

Of course, you can also decide to customize the template before applying it to any target. It is a common PnP Provisioning Template, and you can do whatever you want with it.

Integration with the PnP Partner Pack 2.0

Nevertheless, one of the biggest news related to the PnP Templates Gallery is the native integra-tion with the PnP Partner Pack 2.0. If you don’t know anything about the PnP Partner Pack, you should browse to the following site: http://aka.ms/OfficeDevPnPPartnerPack. There you will find detailed information, and a setup guide to deploy the PnP Partner Pack in your own Office 365 tenant.

The PnP Partner Pack is a sample reference solution, provided by PnP as an open source and com-munity project, that shows how to manage at a business-level the capabilities offered by the PnP Provisioning Engine. We define it a reference solution, because you can use it “as is” or you can customize it, extending its basic idea. Whatever will be your choice, the PnP Partner Pack allows you to see how you should implement some common scenarios and you can satisfy customers’ requirements, adhering to the patterns and practices that we promote as PnP.

The main capabilities of the PnP Partner Pack v. 2.0 are:

  • Self-service site collection and sub site provisioning solution
    • Fully configurable based on business requirements
    • Save existing site as new template from the standard user interface
    • Template creation does not require xml or script knowledge – New templates can be generated from the existing sites
    • Sub site creation implementation with remote provisioning
    • Support for tenant wide or site collection templates
  • Responsive UI package for the Office 365 SharePoint sites
    • Uses JavaScript and custom CSS files to transform OOB SharePoint sites as respon-sive
    • Can be applied to any SharePoint site and does not depend on the PnP Partner Pack
  • UI widget implementations with JavaScript embedding pattern to avoid custom master pages
  • Governance tools for administrators: apply SharePoint farm-wide branding, refresh site templates, bulk creation of site collections
  • Reference governance remote timer jobs (Azure WebJobs) to perform typical enterprise governance operations to existing site collections and sites
  • Configurable branding and text elements for easy branding element changes

When your end users create a new site collection or a new sub-site, using the PnP Partner Pack v. 2.0, they will be able to select a template that is consumed directly, via a set of REST API, from the PnP Templates Gallery. In the following figure, you can see the user interface of the PnP Partner Pack, while selecting the template to apply.

Self Service Site Collection creation UI in PnP Partner Pack showing template search result from template gallery

As you can see there is a drop-down list through which you can select to search for templates in the PnP Templates Gallery. Thus, if the gallery will become full of interesting templates, you will be able to make them directly available to your end users, simply by installing the PnP Partner Pack in your tenant.

Of course, if you don’t like to allow your end users to freely search on the gallery, you can disable that capability just changing a setting in the PnP Partner Pack. Eventually you will be still able to download from the gallery the templates that you like, and make them available in your tenant with a manual upload in the PnP Partner Pack Infrastructural Site Collection.

How to contribute?

To achieve the intended result with the PnP Templates Gallery, it is fundamental to have great contributions from the community, that mean from you, too.

Thus, if you like to submit your templates and ideas, you can simply go to the GitHub repository (https://github.com/OfficeDev/PnP-Provisioning-Templates), which sits under the cover of the gallery, and follow the “Templates Publishing Guidelines”.

You will need to select the matching category for your template, create a .PNP template file, con-figure some properties of the template, provide a README.md file for the template, and submit a Pull Request for your new contribution. Upon approval, your template will become available in the gallery, and you will be credited for your great job in favor of the community.

Wrap up

We, as the PnP Core Team, are really excited about the potential of the new PnP Templates Gallery, together with the release of the PnP Partner Pack 2.0. We hope that you will enjoy the idea and that – if possible – you will also actively contribute to the growth of the gallery.

“Sharing is caring”


Author – Paolo Pialorsi, Senior Consultant, Piasys.com, PnP Core team member

Editor – Vesa Juvonen, Senior Program Manager, SharePoint, Microsoft

4th of October 2016