Collaborate, Innovate, Automate

Find Base List Template ID

This PnP PowerShell script returns the base template name and template ID of any SharePoint Online list or library. Useful when building provisioning scripts that require a specific template type, or when auditing lists to understand how they were created.

Purpose

The script retrieves two key properties from a target list:

Prerequisites

PowerShell Script

$ClientId = ""
$SiteUrl = "https://tenantName.sharepoint.com/sites/siteName"
Connect-PnPOnline -Url $SiteUrl -Interactive -ClientId $ClientId

$list = Get-PnPList -Identity "listName"

Write-Output "List Template Name: $($list.TemplateTypeDisplayName)"

Write-Output "List Template ID: $($list.BaseTemplate)"

Usage Notes