Live training: next batches coming soon. Join the waitlist:Waitlists open:Developer Training →Developer →Copilot Studio Training →Copilot Studio →

How to Get a SharePoint List GUID Using PowerShell (PnP and Get-SPWeb)

Power Automate actions, REST calls and SPFx web parts often want a list’s ID instead of its name. The quickest way to get a SharePoint list GUID is one PnP PowerShell line: connect to the site and read the Id property of Get-PnPList.

Connect-PnPOnline -Url "https://spguides.sharepoint.com/sites/SPGuides" -ClientId "<your-app-id>" -Interactive
(Get-PnPList -Identity "Service Requests").Id

It returns the GUID, for example 33175817-9f28-4ee2-b3a2-875b554b6bd0 for my Service Requests list.

In this tutorial, we’ll get a SharePoint list GUID with PowerShell for one list and for every list on a site, turn a GUID back into a list name, read a list’s created date and item count, and cover the browser trick and SharePoint Server.

Get a SharePoint list GUID with PnP PowerShell

You need PnP PowerShell in PowerShell 7 and your own Entra ID app’s client ID. If that’s new to you, follow installing PnP PowerShell for SharePoint Online first, then connect to SharePoint Online with PowerShell.

Here’s the script I ran against the SPGuides site. It prints the GUID three ways:

Get-PnPList Id property returning a SharePoint list GUID in PowerShell 7

The first line is a Guid object. .Guid gives the same value as plain text, and ToString("B") adds the curly braces some tools and XML files expect.

The SharePoint Online Management Shell has no list cmdlets, so Get-SPOSite can’t give you a list ID. Use PnP for anything inside a site.

How do I get the list ID of every list on a site?

Run Get-PnPList without -Identity and select Title and Id. I filtered out hidden system lists and kept custom lists (template 100), newest first:

Get-PnPList listing SharePoint list titles and GUIDs on the SPGuides site, newest first

Drop -First 15 to see all of them. For a full inventory with URLs and sizes, see getting all lists and libraries from a SharePoint Online site.

Libraries are lists too, so they have GUIDs. These variations return only libraries, or save everything to a CSV file:

# Document libraries only, with their GUIDs
Get-PnPList | Where-Object { $_.BaseType -eq "DocumentLibrary" -and -not $_.Hidden } |
    Select-Object Title, Id

# Every list and library, saved to a CSV file
Get-PnPList | Select-Object Title, Id, BaseType, ItemCount |
    Export-Csv -Path "C:\Scripts\SPGuides-list-ids.csv" -NoTypeInformation

Get the SharePoint list name from a GUID

Error messages, audit logs and flow run history often show only a GUID. Pass it to -Identity and you get the whole list back:

Get-PnPList finding the SharePoint list name, type and URL from a list GUID

The GUID belongs to Service Requests, a GenericList with 623 items. -Identity also accepts the list URL, so Lists/Service Requests returned the same ID. Once you have the list, reading its column details is the usual next step.

If nothing matches, Get-PnPList writes a “does not exist” error and returns nothing. In scripts, add -ThrowExceptionIfListNotFound so a wrong name stops the run instead of failing later:

try {
    $list = Get-PnPList -Identity "Lists/ServiceRequests" -ThrowExceptionIfListNotFound -ErrorAction Stop
}
catch {
    Write-Warning $_.Exception.Message
}

Get the list created date and item count

The same list object carries more than the ID. This script shows when the list was created, how many items it holds and when an item last changed:

PowerShell showing a SharePoint list's GUID, created date, item count and last modified date

Service Requests was created on 10/14/2026 and holds 623 items. SharePoint stores these dates in UTC, so I call ToLocalTime(). To work with the items themselves, see reading and updating list items with PnP PowerShell.

Find the list ID without PowerShell

Open the list, select Settings (gear icon) > List settings, and look at the address bar. The URL ends with listedit.aspx?List=%7B...%7D.

The part between %7B and %7D is the GUID; those codes are the encoded curly braces. It’s fine for one list, but PowerShell is faster for many. The SharePoint REST API can return it too, through _api/web/lists/getbytitle('Service Requests')/Id.

SharePoint Server: get the list GUID with Get-SPWeb

On SharePoint Server (Subscription Edition or an older on-premises version), run this in the SharePoint Management Shell on a farm server. I’ve shown it as code only:

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

$web = Get-SPWeb "https://portal.spguides.com/sites/SPGuides"

# One list's GUID
$web.Lists["Service Requests"].ID

# Every list on the site
$web.Lists | Format-Table Title, ID -AutoSize

# List name from a GUID
$web.Lists[[guid]"33175817-9f28-4ee2-b3a2-875b554b6bd0"].Title

$web.Dispose()

Get-SPWeb doesn’t exist in SharePoint Online. If you see that error on a workstation, read the term Get-SPWeb is not recognized.

More PnP PowerShell list tasks you might need next:

Frequently Asked Questions

How do I get a SharePoint list GUID using PowerShell?

Connect with Connect-PnPOnline to the site, then run (Get-PnPList -Identity “List Name”).Id. The Get-PnPList reference lists every parameter.

Is the SharePoint list ID the same as the list GUID?

Yes. SharePoint gives every list and library a GUID when it’s created, and Power Automate, REST and PnP call it the list ID. It never changes, even if you rename the list.

How do I find a SharePoint list by its GUID?

Run Get-PnPList -Identity followed by the GUID. It returns the list’s title, base type, item count and default view URL.

Can I get a list GUID with the SharePoint Online Management Shell?

No. The SPO cmdlets work with sites, users and tenant settings, not lists. Use PnP PowerShell, CSOM or the REST API for list IDs.

How do I get a list GUID in SharePoint Server?

Use Get-SPWeb in the SharePoint Management Shell and read $web.Lists[“List Name”].ID. See the Get-SPWeb documentation for its parameters.