Hide the next steps dialog from newly created sites in SharePoint

When you create new team or communication sites in SharePoint, the first user that visits will be presented with a template gallery picker. This can be disabled by follow these steps:

After the web template dialog is closed, a new panel is opened on the right side of the page:

As with the template gallery, presenting this dialog to enable the end-user to customize their site is a great addition if you are using the default templates. For organization with their own provisioning solution and templates, this feature might cause confusion, and even end up in the user breaking your ready made site with their own template.

Disable the template dialog with PowerShell

Using the PnP.PowerShell module (https://pnp.github.io/powershell/) you could in example run this after applying a provisioning template:

Connect-PnPOnline Url https://contoso.sharepoint.com/sites/project101
$Web = Get-PnPWeb Includes NextStepsFirstRunEnabled
$Web.NextStepsFirstRunEnabled = $false
$Web.Update()
Invoke-PnPQuery

Disable the template dialog with C#

If you are using the PnP.Framework for C# (https://github.com/pnp/pnpframework) you could add this code to your solution to disable the dialog:

public async Task DisableTemplateGalleryDialog(SharePointClientContext context)
{
Web web = context.Web;
context.Load(web);
await context.ExecuteQueryRetryAsync();
web.NextStepsFirstRunEnabled = false;
web.Update();
await context.ExecuteQueryRetryAsync();
}

Summary

The next steps dialog adds a great capability for basic usage, but can cause unnecessary confusion where you have a enterprise grade provisioning solution. In these cases it can make sense to disable the dialog.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s