How to Get a List by GUID in SharePoint Online?

Requirement: Get a List from GUID in SharePoint Online.

Get List by GUID in SharePoint Online:

To get a list from its GUID, you can use this URL:,

sharepoint online get list from GUID

This takes you to the list settings page of the given GUID. Let’s use PowerShell CSOM to get a list from GUID:

PowerShell to Get List from GUID

Here is how to get SharePoint Online list by its GUID:

#Load SharePoint CSOM Assemblies
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll"
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
#Config Parameters
$ListGUID = [System.Guid]("9a939664-ace4-44af-ad6e-26cefd2e8d32")

#Get Credentials to connect
$Cred= Get-Credential

#Setup the context
$Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL)
$Ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password)
#Get List by id

Write-host "Total Number of List Items:"$List.ItemCount

PnP PowerShell to Get List by GUID in SharePoint Online

#Config Parameters
$ListGUID = [System.Guid]("c94f7b39-2e07-4e40-90b7-c613630e5f8d")

#Connect to PnP Online
Connect-PnPOnline -Url $SiteURL -Credentials (Get-Credential)

#Get list by GUID
$List = Get-PnPList -Identity $ListGUID

#Get List Name
Write-host "List Name:" $List.Title

If you want to get list GUID in SharePoint Online: How to Get List GUID in SharePoint Online?

Salaudeen Rajack

Salaudeen Rajack is a SharePoint Architect with Two decades of SharePoint Experience. He loves sharing his knowledge and experiences with the SharePoint community, through his real-world articles!

Leave a Reply