Use PowerShell to List SharePoint Site Owners: Practical Checklist for SharePoint Owners
🔍 WiseChecker

Use PowerShell to List SharePoint Site Owners: Practical Checklist for SharePoint Owners

SharePoint site collection owners change often. You need a fast way to see who owns each site in your tenant. Manual checks in the browser take too long for many sites. PowerShell gives you a single command to list all site owners. This article shows you the exact PowerShell commands to use and a checklist to keep your owner list accurate.

Key Takeaways: PowerShell Checklist for SharePoint Site Owners

  • Get-SPOSite -Limit All | Select Url, Owner: Lists every site URL and its primary owner in one table.
  • Get-SPOSite -Detailed | Select Url, Owner, SecondaryOwner: Adds secondary site owners to the output.
  • Get-SPOSiteGroup -Site $Url | Where Group -eq “Owners”: Shows all members of the Owners group for a specific site.

ADVERTISEMENT

Why PowerShell Is the Best Tool for Listing SharePoint Site Owners

The SharePoint admin center shows site owners one site at a time. For a tenant with 100 or more sites, this takes hours. PowerShell runs the same check in seconds. The SharePoint Online Management Shell module connects to your tenant and reads site properties directly from the service.

The cmdlet Get-SPOSite returns a site object that includes the Owner property. This property holds the email address or user principal name of the primary site collection administrator. For secondary owners, you need the SecondaryOwner property. The Owners group inside each site contains all users who have full control. PowerShell can read that group membership as well.

You need the SharePoint Online Management Shell module installed and the SharePoint admin role in your tenant. Without these prerequisites, the commands will fail with access denied errors.

Steps to List SharePoint Site Owners with PowerShell

Follow these steps to connect to your tenant and list all site owners. Each step builds on the previous one. Run the commands in the SharePoint Online Management Shell or Windows PowerShell 5.1.

  1. Install the SharePoint Online Management Shell module
    Open PowerShell as administrator. Run Install-Module -Name Microsoft.Online.SharePoint.PowerShell -Scope CurrentUser. Press Y to confirm the installation from PSGallery.
  2. Connect to your SharePoint tenant
    Run Connect-SPOService -Url https://yourtenant-admin.sharepoint.com. Replace yourtenant with your actual tenant name. A sign-in window opens. Enter your SharePoint admin credentials.
  3. List all sites with their primary owners
    Run Get-SPOSite -Limit All | Select Url, Owner. The output shows each site URL and the primary owner email address. The -Limit All parameter ensures no sites are skipped.
  4. Include secondary owners in the output
    Run Get-SPOSite -Detailed -Limit All | Select Url, Owner, SecondaryOwner. The -Detailed parameter adds the SecondaryOwner property. Some sites may show blank for secondary owner if none is set.
  5. Export the owner list to a CSV file
    Run Get-SPOSite -Detailed -Limit All | Select Url, Owner, SecondaryOwner | Export-Csv -Path C:\temp\siteowners.csv -NoTypeInformation. Open the CSV file in Excel to filter, sort, or audit the data.
  6. Check the Owners group for a specific site
    Run Get-SPOSiteGroup -Site https://yourtenant.sharepoint.com/sites/sitename | Where-Object {$_.Group -eq “Owners”}. This shows every user who has full control through the default Owners group.

ADVERTISEMENT

Practical Checklist for SharePoint Owners

Use this checklist after you run the PowerShell commands. Each item helps you verify and clean up site ownership. Check the items monthly or after major staff changes.

Verify that every site has at least one active owner

Open the exported CSV file. Look for blank Owner fields. A site with no primary owner becomes unmanageable. Assign a new owner using Set-SPOSite -Identity $Url -Owner newowner@yourtenant.com.

Remove former employees from owner roles

Compare the Owner and SecondaryOwner columns against your HR directory. If a person no longer works at the company, run Remove-SPOUser -Site $Url -LoginName user@yourtenant.com. This removes them from the Owners group and all other site groups.

Standardize secondary owners on all team sites

Many sites have no secondary owner. Run Set-SPOSite -Identity $Url -SecondaryOwner secondary@yourtenant.com for each site that lacks one. A secondary owner can take over if the primary owner leaves.

Audit external users in the Owners group

External users should rarely be site owners. Run Get-SPOSiteGroup -Site $Url | Where-Object {$_.Group -eq “Owners”} | Select-Object -ExpandProperty Users. Look for email addresses outside your domain. Remove any external owner who does not have a business need.

Document owner assignments in a central list

Keep the exported CSV file in a secure SharePoint document library. Update the file each time you run the script. Share the document with your IT team so everyone knows who owns each site.

Common Mistakes When Using PowerShell for Site Owners

“Get-SPOSite shows “Owner” as a GUID instead of a name”

This happens when the site was created from a Microsoft 365 group. The Owner property shows the group ID, not a person. Run Get-SPOSiteGroup -Site $Url to see the actual members of the Owners group. The group contains the real user accounts.

“The PowerShell command returns access denied”

You need the SharePoint admin role in the Microsoft 365 admin center. Your account must also be a site collection administrator for the sites you want to query. Run Connect-SPOService again with a global admin account if needed.

“The Owners group list includes service accounts or system accounts”

SharePoint Online automatically adds some system accounts to the Owners group. These accounts start with “spo” or “app@sharepoint”. You cannot remove them. Ignore these entries when auditing human owners.

Team Site Owners vs Communication Site Owners: Key Differences

Item Team Site (Microsoft 365 Group) Communication Site
Primary owner Microsoft 365 group owner Site collection administrator
Secondary owner Set via Set-SPOSite -SecondaryOwner Set via Set-SPOSite -SecondaryOwner
Owner group membership Group owner list + site Owners group Site Owners group only
PowerShell to list owners Get-SPOSiteGroup shows group members Get-SPOSite shows Owner property

Team sites connected to a Microsoft 365 group have two layers of ownership. The group owner controls membership in the group. The site Owners group controls SharePoint permissions. Communication sites have only the site Owners group. Always check both layers for team sites to get a complete owner list.

Now you can list every SharePoint site owner in your tenant using PowerShell. Run the Get-SPOSite commands monthly and compare the output against your checklist. Use the CSV export to keep a permanent audit trail. For sites with Microsoft 365 groups, remember to check the group owner list as well as the site Owners group.

ADVERTISEMENT