SharePoint Look Book Templates Deployment
I wanted to experiment with Restricted SharePoint Search for Copilot. To facilitate this, I planned to install some SharePoint Look Book templates. These templates would allow me to differentiate and filter search results more effectively.
However, I discovered that SharePoint Look Book templates are no longer directly deployable to tenants via the SharePoint Look Book. The reason for this change is unclear, but what’s more important is the solution going forward.
New Approach for Installing Look Book Templates: PnP PowerShell
To deploy SharePoint site templates now, we’ll use PnP PowerShell scripts. You can access several templates via the GitHub repository, which contains all the necessary provisioning scripts.
For a full list of available templates, you can refer to this guide.
Example: Adding the Microsoft 365 Learning Pathways Site
For this example, we’ll focus on installing the Microsoft 365 Learning Pathways template. Here’s the process:
- Download the Template
Download theM365LP.pnpfile from the GitHub repo: sp-dev-provisioning-templates/tenant/O365Learning and save it locally. - Create a Communication Site
In your SharePoint tenant, create a ‘Communications Site’ and name it M365LearningPathways. Keep the default settings, as they will be overwritten by theM365LP.pnptemplate.
PowerShell and PnP PowerShell Setup
- Install PowerShell 7.x
Install the latest version of PowerShell 7.x via Winget. This is the Microsoft-recommended method and ensures that you receive updates. Instructions can be found here. - Run PowerShell as Administrator
Run PowerShell 7.x in Administrator mode and confirm the version with the following
$PSVersionTable
Example output:PSVersion 7.4.5 - Install the SharePoint PnP PowerShell Module
Install the SharePoint PnP PowerShell Online module:Install-Module SharePointPnPPowerShellOnlineValidate the installation:Get-Module SharePointPnPPowerShell* -ListAvailable | Select-Object Name,Version | Sort-Object Version -Descending
Example output:SharePointPnPPowerShellOnline, Version: 3.29.2101.0
SharePoint Online Management Shell
- Import the Management Shell Module
Import the SharePoint Online Management Shell:Import-Module Microsoft.Online.SharePoint.PowerShell -UseWindowsPowerShell - Validate the Module Version
Check the version of the imported module:Get-Module -ListAvailable -Name Microsoft.Online.SharePoint.PowerShell | Select Name,Version
Example output:Microsoft.Online.SharePoint.PowerShell, Version: 16.0.25221.0 - Connect to Your SharePoint Tenant
Connect to the SharePoint tenant admin site:Connect-SPOService -Url https://yourtenant-admin.sharepoint.com
The above validation scripts and outputs – example:
Authentication and Implementation
Before you can authenticate with PnP PowerShell, you need to register an Entra ID Application in Azure. You also need to assign the necessary permissions to it. Instructions for this can be found here.
I recommend using App Only registration to avoid needing to input your credentials repeatedly.
Once the application is registered and permissions are granted, you can connect to SharePoint Online using PnP PowerShell. For this demo, I granted full permissions.Connect-PnPOnline https://yourtenant-admin.sharepoint.com -Interactive -ClientId 'your-client-id'
Applying the M365 Learning Pathways Template
Now that you’re connected, you can apply the template to the previously created site:Invoke-PnPTenantTemplate -Path .\data\M365LP.pnp -Parameters @{"SiteTitle"="M365LearningPathways";"SiteUrl"="/sites/M365LearningPathways"} -Verbose
Success!
The Microsoft 365 Learning Pathways site template is now successfully deployed and available in your tenant.
To enable and configure Restricted SharePoint Search for Copilot for Microsoft 365 refer this walkthrough: How to Enable SharePoint Restricted Search and Sites List – Swetha Sankaran
Discover more from QubitSage Chronicles
Subscribe to get the latest posts sent to your email.


