Modern Experience Sites can be now managed programmatically using Site Scripts that help us to automate assets creation. Added to that we can use Office 365 PnP Online CSOM to create and manage Modern pages that allows Dev and IT Pros to manage the Modern Page experiences across SharePoint sites. In this session, we will look through various IT Pro and Developer tools to provision and manage SharePoint Online Modern experience pages and web-parts. We will deep dive into the newly release Site Scripts process, and some of the usual tools such as PnP PowerShell and Office PnP CSOM on how we can manage these assets.
2. About me
- SharePoint, Office 365 and Azure Solutions Consultant at Kloud
Solutions
- 12 years of experience working on SharePoint and MS
Technologies
- I am a Consultant, Architect, Project Lead and always a
Developer.
- Microsoft Certified Professional in SharePoint
https://asishpadhy.com
https://twitter.com/asishpadhy - @asishpadhy
https://www.linkedin.com/in/asishpadhy
https://blog.kloud.com.au/author/asishpadhykloud/
3. Agenda
What is Provisioning?
Provisioning Options
Provisioning Matrix
Provisioning Flows
Best Practices
4. What is Provisioning
Process to programmatic and scripted creation of SharePoint site and
assets based on business rules
Mostly used for mass provision of team sites and content that is created
in an periodic basis
Benefits
Standardization
Consistency
Application of Governance and Security Policy rules
Branding and Theming
Classification and Identification
5. Provisioning Options
PowerShell
PnP PowerShell cmdlets
SPO Management Shell cmdlets
CSOM
Office Dev PnP Core
SharePoint CSOM
JSOM
Site Scripts
Site Design
XML
Provisioning Template
6. Provisioning Matrix comparison
ScopeTools Local PowerShell
(PnP & SPO
cmdlets)
Native
Applications
(CSOM)
Client Apps and
Flow (REST)
Site Scripts
(JSON)
Provisioning
XML
Site Collections Yes Yes No No Yes
Site / Web Yes Yes Yes No Yes
Office 365 groups Yes Yes No No No
List/Library Yes Yes Yes Yes Yes
Theme Yes Yes Yes Yes Yes
List Item Yes Yes Yes No No
Content
type/Fields/Views
Yes Yes Yes Yes Yes
Client Side Pages Yes Yes No No Yes
Folders Yes Yes Yes No No
7. Provisioning Matrix comparison cont’d…
ScopeTools Local PowerShell
(PnP & SPO
cmdlets)
Native
Applications
(CSOM)
Client Apps and
Flow (REST)
Site Scripts
(JSON)
Provisioning
XML
Hub settings Yes Yes Yes No Limited
App Deployments Yes Yes Yes Limited Yes
List Configuration Limited Yes Yes No Yes
Site Settings Yes Yes Limited Limited Yes
Taxonomy Store No Yes Yes No Yes
Taxonomy Fields No Yes Yes No Yes
Navigation Limited Yes Limited Limited Limited
Site Search Settings Yes Yes No No Yes
Enterprise Search Yes Yes Yes No No
Security Yes Yes No Yes Yes
8. Provisioning Flows
SharePoint List, Flow and Azure Function
PowerShell Script Task Scheduling
Site Scripts and Site Design
Site Scripts, Site Design, Flow and Azure Function
Console Applications with CSOM
13. My Few thoughts
Benefits
Custom Provisioning with custom templates
Site Assets are ready decreasing business overheard on administration and configuration
Easily manageable scripts and design without custom code requirements
Allow users to request sites without worrying about SharePoint knowledge
Limitations
Dependency on custom hosting or scripts
Need additional hosting for PnP Provisioning Components
No seamless process for status updated
Error and Troubleshooting is distributed and might need time for fixing custom issues
Office 365 groups need Graph App support in PnP PowerShell and CSOM
About more than 30 mins of provisioning time with PnP Provisioning XML updates
Use of AD groups nesting is not supported, but could be used to control SharePoint access
and request to join Group facilities
15. PnP PowerShell Cmdlets
Connect to Site Collections, Need SharePoint Admin rights
Important cmdlets
New-PnPTenantSite (Creates a site collection)
New-PnPSite (Creates a communication site or modern team site)
Get-PnPProvisioningTemplate (Gets a Provisioning Template)
Apply-PnPProvisioningTemplate (Applies the template)
Add-PnPOffice365GroupToSite (creates a group and add classic team site)
Add-PnPClientSidePage
More commands - https://docs.microsoft.com/en-
us/powershell/sharepoint/sharepoint-pnp/sharepoint-pnp-
cmdlets?view=sharepoint-ps
16. SPO Cmdlets
Connect to SharePoint Tenant Site, Need Tenant Admin rights
Important Cmdlets
Set-SPOSite (setting site collection properties, set no-script to false)
Set-SPOSiteScript (creates a site script)
Set-SPOSiteDesign (create a site design)
Register-SPOHubSite (makes a site as hub site)
Add-SPOHubSiteAssociation (adds a site to a hub site)
Set-SPOSiteOffice365Group (creates a new group and associates an
existing SharePoint site to it)
More commands - https://docs.microsoft.com/en-
us/powershell/module/sharepoint-online/?view=sharepoint-ps
17. CSOM References
Create a new Modern Team Site
Apply a provisioning template
Add a site page
Promote and demote a site page to news page
Apply settings and changes to SharePoint Online sites
Create and edit SharePoint page section and web parts
18. JSOM references
Called in a Site Script
Create a list
Add and delete list fields
Add and remove views
Add and remove content types
Apply custom formatting on columns
Add list view command
Navigation
Add-ins
Users and Principals
More info can be found here - https://docs.microsoft.com/en-
us/sharepoint/dev/declarative-customization/site-design-json-schema
19. PnP Provisioning Template
Tenant settings
Site and web settings
Navigation
Security
Site Collection Term store additions
Site Columns, Site Content types and Site settings
List, Libraries and Views
Client side pages and Apps
Files and web parts
More info can be found here - https://github.com/SharePoint/PnP-Provisioning-
Schema/blob/master/ProvisioningSchema-2018-05.md
Notas do Editor
Hub Settings – only association to a Hub supported
App Deployments – Add in supported and register and extension
Site Settings (json) – Can only set regional settings
List Configuration – cannot set settings pertaining to specific fields
Navigation – Cannot update Url of an existing node
Site search settings – cannot set audit settings