Get all SharePoint Embedded containers with PowerShell (paging included)

As known and documented by Microsoft, the PowerShell command Get-SPOContainer returns the first 200 SharePoint Embedded (SPE) containers. If you have more containers in your tenant, you must loop through all pages until you have collected all containers. Unfortunately, the equivalent command Get-PnPContainer does not yet support all SPE container properties.

It’s annoying that the SharePoint PowerShell command includes no -All parameter. So, I wrote a PowerShell script to collect all containers owned by Microsoft. The script loops through all pages and returns the containers from your tenant. Optionally, the script returns the container details (properties).

*********************
Update from 14 August 2025:

Recently, I identified the application IDs for Microsoft-owned SharePoint Embedded containers (including undocumented ones) and updated my script to collect all SPE containers by default. The system will return an error with a count of 0 if a container application doesn’t exist in your tenant.

Owning Application Application ID
Loop Workspaces a187e399-0c36-4b98-8f04-1edc167a0996
Microsoft Designer 5e2795e3-ce8c-4cfb-b302-35fe5cd01597
Outlook Newsletters 155d75a8-799c-4ad4-ae3f-0084ccced5fa
Declarative Agent e8be65d6-d430-4289-a665-51bf2a194bda
Teams Virtual Event VOD 7fc21101-d09b-4343-8eb3-21187e0431a4

The export provides a clear breakdown of valuable details, such as how much SharePoint storage each container consumes, when new containers were created, and more.

The export provides a clear breakdown of valuable details
The export provides a clear breakdown of valuable details

*********************

  • For my scenario, it’s implemented as a standalone script. It can be easily adapted into a function for reuse in other scripts or inclusion in your own PowerShell module.


Requirements
  • Your account must be either a Global Reader or a SharePoint Embedded administrator.
  • You need the SharePoint Online PowerShell module.
  • You’ll need to run the script using PowerShell 5 since the SharePoint Online PowerShell module still lacks PowerShell 7 compatibility.
    Thanks to the SharePoint Online PowerShell development team for their continued commitment to not supporting PowerShell 7.
  • You need my script Get-TAAllSPEContainers, which you can download from my GitHub repository.


Get the SharePoint Embedded containers

First, connect to your SharePoint tenant as a Global Reader or SharePoint Embedded administrator.

PowerShell
# You must use PowerShell 5
Import-Module Microsoft.Online.SharePoint.PowerShell
Connect-SPOService -Url "https://<Tenant>-admin.sharepoint.com 


Second, run the script.

PowerShell
# Unless specified otherwise, the script collects all Microsoft-owned containers by default.
$AllSPEContainers = .\Get-TAAllSPEContainers.ps1 # OR

$AllLoopContainers = .\Get-TAAllSPEContainers.ps1 -OwningApplication MicrosoftLoop # OR

$AllDesignerContainers = .\Get-TAAllSPEContainers.ps1 -OwningApplication MicrosoftDesigner # OR

# Include detailed properties for each container.
# Depending on the number of containers, this may take a while.
$AllLoopContainers = .\Get-TAAllSPEContainers.ps1 -OwningApplication MicrosoftLoop -IncludeDetails


Third, you get the results.

PowerShell

The difference between basic and detailed results (parameter -IncludeDetails).

Basic results
It’s just the container, with the container ID, creation date, the PrincipalOwner (for newer container types), and other information. The owner is missing in older SPE container types (like the Ideas container). You get the results quickly.

Basic container information
Basic container information

Detailed results
The script collects the container identities, including all properties provided by SharePoint. Depending on the number of SPE containers, the collection may take a while.

Detailed container information
Detailed container information
Share
Avatar photo

Tobias Asböck

Tobias is a Senior System Engineer with around ten years of professional experience with Microsoft 365 products such as SharePoint Online, SharePoint Premium, OneDrive for Business, Teams Collaboration, Entra ID, Information Protection, Universal Print, and Microsoft 365 Licensing. He also has 15+ years of experience planning, administering, and operating SharePoint Server environments. Tobias is a PowerShell Scripter with certifications for Microsoft 365 products. In his spare time, Tobias is busy with updates in the Microsoft 365 world or on the road with his road bike and other sports activities. If you have additional questions, please contact me via LinkedIn or [email protected].

Leave a Reply

Your email address will not be published. Required fields are marked *