SharePoint Patterns & Practices - PnP Core and PnP PowerShell SIG - 7th of October
1.
2. Miscellaneous announcements
Site Designs - Upcoming capability around site
templating model in SharePoint Online
Demo – Hooking in your custom provisioning solution
to out of the box Site Designs –
Patterns, options and considerations
Q&A
3.
4. Documentation and
guidance
aka.ms/spdev-docs
• New consolidated platform
• All SharePoint development
topics will move here
• Content managed in GitHub,
but surfaced in the
docs.microsoft.com/sharepoint
11. Custom theme support
Resources
PowerShell management support (6906.1200):
https://aka.ms/spsitetheming
Theme builder tool (hosted on Fabric site):
https://aka.ms/spthemebuilder
12. site designs
Apply site settings and
call custom solutions
Provision select settings
after creation; use
Microsoft Flow to call
apply additional business
logic
Custom scripting of sites
through provisioning
Site designs can be
injected into in-product
provisioning experience
to automate consistent
site creation
Clean & consistently
branded sites
Apply company theme or
custom page designs at
time of creation
13. var listRecipe = {
"$schema": "schema.json",
"actions": [
{
"primary_verb": "List.CreateOrOpen",
"target": "Customer Tracking",
"templateType": 100,
"verbs": [
{
"verb": "SetDescription",
"description": "List of Customers and Orders"
},
{
"verb": "AddFieldIfNotExist",
"fieldType": "Text",
"displayName": "Customer Name",
"isRequired": false,
"addToDefaultView": true
},
{
"verb": "AddFieldIfNotExist",
"fieldType": "DateTime",
"displayName": "Date of Delivery",
"isRequired": true
},
]
},
{
primary_verb: "Theme.Apply",
target: "Contoso Travel Green"
}
],
"bindata": {},
"version": 1
};
Idempotent syntax of
common site configuration
actions
Script actions can be
concatenated in single file or
multiple files can be used
(and reused)
RestRequest("/_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.Scr
iptUtility.CreateFormula", {info:{Title:"Contoso Travel - Legal Case Book",
Description:"Restricted site design to create a legal case book site",
ScriptGuids:["b432a1cd-7e1f-4fb1-9829-633d8MaG1C”],
Targets:["CN=GUID,OU=GUID,OU=Tenants,OU=MSOnline,DC=<value>,DC=
msoprd,DC=msft,DC=net"], IsDefault:true, WebTemplate:"68"}});
Site Design attributes
designate display
characteristics and target
template
14. Create lists/libraries (incl. settings)
Apply company themes
Trigger logic apps (using Microsoft Flow)
Activate features
* Create modern pages; set as home page
*Add to site nav
*Add declarative formatting to a column
*Join site to Hub
* Enable external access
* Set site classification
…with more to come
15. var flowRecipe = {
"$schema": "schema.json",
"actions": [{
"primary_verb": "Flow.Trigger",
"target": “<<http post url>>",
"name": “contoso hr additions",
"parameters": {
"department": "HR",
"cost center": "1023"
}
}
],
"bindata": {},
"version": 1
};
SharePoint
Online
Storage
Queue
Azure Function
Microsoft Flow
Business logic will handle the message
processing. Site URL is used as a parameter to
connect to site using remote APIs. Applies
needed customization using remote
provisioning techniques, for example with PnP
remote provisioning template model.
Script configured to start
previously configured flow,
which will receive the newly
created site URL as parameter.
Flow includes a step to pass
site URL to Azure storage
queue for delegating
processing to Azure side
1 2
3
4
And while we think these experiences are pretty awesome – we do recognize that there are specific configurations you need – to convey brand, to manage content structure, to define the processes you need to optimize running your day-to-day business on SharePoint.
And we also get that it’s can be difficult in a modern intranet to have to configure these sites over and over.
So, support for business automation processes is key here.
One aspect of this is around brand. You MUST attend Melissa and Denise’s talk tomorrow morning to learn more about this.
We’ve heard from you that these elements are most important!
Today I’m going to focus on two of them that are pertinent to this extensibility discussion
Theming = color + font (but other elements incl. layout, logo, etc.)
Site Designs = a way to automate programmatically through site prov these configurations
Templates have traditionally been one way to do it – but they have their limitations.
If you joined me last year Vesa and I talked about the options and challenges of several site template approaches – and highlighted the value of the remote provisioning pattern as an alternative to established ways of provisioning and branding SP sites.
The great thing about remote provisioning is it addresses the problems of upgradeability and availability – but it is remote
Instead of customizing site templates – and losing value of future updates – we’re building on this async provisioning pattern – providing a way to extend and programmatically apply configurations post-creation
Today I'm pleased to announce that in addition to more updates after Ignite, you are now able to upload and manage your own custom themes!
Available to the entire tenant – through both the modern CTL and provisioning – as I’ll show in a bit
This week we’re also announcing a new site extension capability – site designs.
The driver here was really around two principles:
We need to provide extensibility so customized sites (whether by design or function) can be created and reused w/o being orphaned as we release new capabilities (read: future-proof designs)
We need to provide flexible governance framework to provide appropriate administration and controls for enterprise IT
Three areas of configuration: look & feel; site settings; custom apps & business logic
Site Script
A declarative script executed post-site creation for applying a set of defined site configurations, like custom lists, libraries, features (incl. updates to what we provide in base templates)
The actions define configurable site elements and settings that are commonly performed in the customization of a site
Site Design
This is the entity a user would choose at creation time to make their newly created site a certain way.
Internally, it refers to the site formula or combination of components (base template + site properties/metadata + configuration recipe) presented to user in self-service site provisioning flow
This list will support audience-targeting so customers can scope who can select which site designs during provisioning
Currently only planned for application to modern site templates (team and communication)
The combination of site script w/ design – intended to provide a modern, IT-Pro / IW focused replacement to “save site as template”
Very similar to PnP model where we execute a set of configuration instructions on a site asynchronously – whether @ time 0 or time N
Idempotent model allows us to re-run a recipe multiple times without changing the result beyond the initial application
Scripts are intended to be flexible – to extend sites safely and consistently w/in a tenant - and in a manner that can accommodate upgradeability
All centrally stored w/ APIs so they can be leveraged across tenant
We are focusing on key settings and actions that folks commonly need to configure or wish to automate
But we recognize folks have existing investments – and it will take awhile to have everything in this new syntax
As you saw me demonstrate at the top of the session – leveraging Flow to orchestrate other actions is a powerful model – and one where we saw an opportunity to help our users even leverage existing solutions and investments
Let me walk through a flow for triggering a flow that will demonstrate in a moment
This flow walks through the triggerFlow action – align w/ intro demo