newest capability for creating SharePoint sites based on a template was rolled out in Office 365. Site designs and site scripts automatically
apply custom configuration when new SharePoint sites are created. It’s completely
integrated in the SharePoint UI and offers an alternative to the PnP
provisioning engine. In this blogpost, I will demonstrate to you how to work
with this new capability in different scenarios.
You may need to update your SharePoint Online Management Shell to the version 16.0.7414.1200 or later, in order to use the demonstrated
PowerShell commands below.
- Understanding site scripts
a site script and a site design
- Manage access to site design
a SharePoint site from a site design
site design to an existing SharePoint site
you have been working with PnP to provision content to SharePoint sites, you’ll
notice that site scripts have no similarity to the PnP schema, which is ok,
since PnP is an open source project maintained by the community and not by
Microsoft. Now Microsoft brought his own toy to the site provisioning’s
playground. It supports triggering Flow, but in terms of provisioning it
includes much fewer functions than PnP.
site script’s schema is not difficult to understand since it is based on a JSON
structure which works with a list of actions. Each action is specified by a
verb value which must be written correctly
since they are treated as case sensitive values. Below you see a list of
Applies a custom theme
Manages guest access
Creates a new list
Adds a navigation link
Triggers a Microsoft flow
Sets a logo to a communication site
(Not supported in team sites)
Joins a hub site
is what a site script schema configured with all the actions above looks like:
Here you find recent information about site scripts’ supported actions.
SharePoint Hub Sites are expected to be rolled out to Office 365 First Release
tenants in the first half of 2018.
Update 25.03.2018: SharePoint Hub Sites are now rolling out to targeted release customers in Office 365.
Create a site script and a site design
step demonstrates to you how to add the site script above to SharePoint online
and to create a site design which uses that site script.
property WebTemplate provides the set up for the following templates:
- 1: Register this site design with the team site template (group-less) - Not working yet - Issue has already been reported
- 64: Register this site design with the team site template (modern site)
- 68: Register this site design with the communicate site template
property SiteScript is an array of site scripts which run the entered scripts
in the listed order. Here is what the added site design looks like in
3. Manage access to site design
this scenario: only site collection administrators can create sites in your
organization. Scoping was added to site designs to handle this business
requirement exactly. You can configure site designs to only appear for specific groups
or people in your tenant.
designs are by default available to everyone in your organization, but there
are two different kinds of scopes you can set up:
- User: Email
address – e.g.: firstname.lastname@example.org
- Security Group: Group’s
display name or principal – e.g.: Administrators or c:0t.c|tenant|5ec63687-daf1-4d36-8689-213cdf2f3767
example below shows how to specify the scope by a security group:
property Rights can only be set up to View
which restricts the site design’s usage to the defined users/groups.
Create a SharePoint site from a site design
can start creating your SharePoint sites based on the site design you’ve just
created from the SharePoint UI. Below you'll find the steps needed:
to your SharePoint site’s home page (https://example.sharepoint.com/_layouts/15/sharepoint.aspx)
Team site since we created a site design
for team sites
the design we’ve just created (Project)
a site name, click Next than Finish
View updated site after the script
site design to an existing SharePoint site
a site design on an existing SharePoint site processes delta changes. This means
that either changes apply to the site without corrupting existing data or that a
full provision occurs. Of course, the full provision will occur if the provisioned
data hasn't been available in the site before.
can only be done programmatically since there is no UI support yet. The
PowerShell script below demonstrates to you how to run the site design on an
see two great advantages to SharePoint administrators in working with site design:
integration in the SharePoint UI: Anyone can create custom SharePoint sites
without the need to run PowerShell scripts, such as PnP.
of triggering Flow: "Everything" is possible J For instance, you can continue using your PnP
templates from Microsoft Flow.
can't wait to see what Microsoft has planned for site designs.