Getting Started with Office 365 PnP
What is Office 365 PnP (Practice and Pattern)? It is about providing a site provisioning engine to create sites and site collections within a SharePoint Online tenant or a on premise SharePoint farm base on a given definition. The definition of a site provisioning engine is an object describing the provisioned components like list, libraries and features. But also SharePoint security groups, users, site property bags entries and Composed Looks. O365 PnP is also about rising initiatives awareness to the public community about training, best practices and guidance.
With the template provider, the definition object can be transformed to JSON or XML. This works in both ways, so you can transform a XML definition into an object. Therefore you are able to define the structure of a site or site collection in a XML template. The definition object will be referred to as PnP template. Few classic site provisioning techniques is best explain with the blog author Vesa Juvonen who explains these techniques in more detail.
The modern way of site provisioning is remote provisioning. Remote provisioning uses the Client Side Object Model (CSOM) or the REST API to create a site and fill this site incrementally with CSOM/REST requests. This model is suitable for both on-premises and Office 365 online in the cloud, since we control the customizations outside of the SharePoint farm in an independent solution.
To improve the experience using remote provisioning, the Office Dev PnP team created PnP Provisioning. As mentioned earlier, a really great part of PnP Provisioning is defining a site template in a XML using the PnP Provisioning Schema.
Component of PnP
All components of office dev pnp are placed on github. It started in a single repository, but soon the volume of the program became so large, the office dev pnp team decided to split the individual components in separate repositories.
Pnp partner pack
contains the pnp partner pack, a starter kit for customers and partners and combines numerous patterns and practices demonstrated in the pnp samples to one reusable solution, which can be deployed and used in any office 365 tenant.
contains more tools, code packages and scripts for the on-premises and hybrid setup, than purely for the office 365 operations. Using classic terminology, this could be considered more targeted for it pro’s, architects and administrators in on-premises deployments.
To get started with Office 365, below are some top useful links to begin with:
2. Visit the O365 PnP home page at: http://dev.office.com/patterns-and-practices
From this homepage go to the trainining section and watch the videos:
- #1 – Introduction to SharePoint add-in model transition
- #2 – Managing site settings using add-in model
- #3 – Controlling branding in SharePoint using add-in model
- #4 – Building UX components with add-in model
- #5 – Remote timer jobs and event receivers
- #6 – Site collection and site provisioning with add-in model
- #7 – User Personalization and One Drive for Business operations using add-in model
- #8 – Enterprise Content Management and SharePoint add-ins
- #9 – Using search capabilities with add-in model
- #10 – Transformation guidance from farm solutions to add-ins
* To find and download the Power Point presentation slides for each video, go to https://docs.com and search for the video title.
* Each training video also contains its sample source codes which can be found at this GitHub site: https://github.com/OfficeDev/TrainingContent/tree/master/O3658
3. Visit the O365 PnP GitHub open repository site to explore sample codes and other useful links.
4. To find and search for relevant sample codes and documentation guide on using O365 PnP, go to http://dev.office.com/patterns-and-practices-resources
5. Install the following tools:
- NuGet Office 365 PnP into VS 2013/2015 – Search “officedevpnp” in NuGet Manager.
- Download and install Git
6. Create a Console application project in VS to provision a document library into O365 SharePoint site. For sample code watch the video title “How to get started with Office 365 PnP“
Other useful links of sample codes for specific project needs are:
Site collection and sub site provisioning:
- Site collection provisioning
- Sub site provisioning
- PnP Add-In Transformation Training module 6: Site provisioning with add-in model
PnP Partner Pack:
- Step-by-Step guidance on how to setup apps to Office 365 tenant and Azure
- PnP Partner Pack – Setup Guide video at Channel 9.
- Pnp Partner Pack @ GitHub open source
- O365 PnP FAQ
- Site provisioning techniques and remote provisioning in SharePoint 2013
- SharePoint 2013 site provisioning techniques presentation video recording
- Branding and site provisioning solutions for SharePoint 2013 and SharePoint Online
- Getting started with the Office 365 Developer Patterns and Practices PowerShell Cmdlets