When you create lots of SharePoint sites, one of the first questions that comes up later is – “Who owns this site?”
Maybe you’re doing a clean-up, planning a migration, or troubleshooting a permissions issue, and you need to quickly find the right person to talk to.
In this tutorial, I’ll show you step-by-step how to get the SharePoint site owner using PowerShell and PnP PowerShell.
We’ll look at both non-group sites and Microsoft 365 group-connected sites, and I’ll also share scripts to generate a full tenant-wide report of site owners that you can export to CSV and work with in Excel.
When and Why You Need SharePoint Site Owners
You may want to get SharePoint site owners when:
- You are cleaning up unused sites in SharePoint and need a contact person.
- You want to send communication about changes, migrations, or governance.
- You are auditing permissions and ownership for compliance.
- A user raises an issue like “Who owns this site?” and you need a quick answer.
In a modern tenant, you usually deal with two types of sites:
- Non-group connected sites: Classic team sites, SharePoint communication sites, project sites, etc.
- Microsoft 365 group-connected sites: Modern SharePoint team sites connected to a Microsoft 365 group (and often to Teams).
The way you get owners is slightly different for each type, so we’ll cover both.
Prerequisites and Modules You’ll Need
To run the below PowerShell commands in this tutorial, you need:
- SharePoint Online admin or at least SharePoint admin center access.
- PowerShell 5.x or later on Windows (or PowerShell 7+ if you’re using the modern modules).
- The required modules installed and imported.
Modules to install (run once per machine):
Install-Module -Name Microsoft.Online.SharePoint.PowerShell
Install-Module -Name AzureAD
Install-Module -Name PnP.PowerShellGet Site Owner for a Single Non-group Site (SharePoint Online PowerShell)
This is the simplest case: a standalone SharePoint site that is not connected to a Microsoft 365 group.
Step 1: Connect to the SharePoint admin center
Open PowerShell and connect to your SharePoint admin center. Replace the URL with your tenant admin URL.
$AdminCenterUrl = "https://yourtenant-admin.sharepoint.com"
Connect-SPOService -Url $AdminCenterUrl -Credential (Get-Credential)A dialog box will appear. Enter your SharePoint admin credentials.
Here is an example:
#Credentials to connect
Connect-SPOService -Url https://szg52-admin.sharepoint.com/ -Credential [email protected]Step 2: Get the site owner for a specific site
Replace the URL below with the site you’re interested in.
$SiteUrl = "https://yourtenant.sharepoint.com/sites/YourSiteName"
Get-SPOSite -Identity $SiteUrl | Select OwnerThis returns the primary site collection owner (usually a user principal name like [email protected]).
If you like a cleaner display:
(Get-SPOSite -Identity $SiteUrl).OwnerHere is an example:
#sharepoint online powershell get site owner
Get-SPOSite "https://szg52.sharepoint.com/sites/CollaborativeCore" | Select OwnerHere is the exact output in the screenshot below:

This is ideal for quick checks or answering “Who owns this site?” for a single URL.
Check out Connect to SharePoint Online Using PowerShell
Get SharePoint Site Owner for a Non-group Site using PnP PowerShell
PnP is great when you’re already using it for other automation, or you prefer its Connect-PnPOnline pattern. You can follow the below steps to get the SharePoint site owner for a non-group connected site using PnP PowerShell.
Step 1: Connect using PnP
You can connect directly to the admin center or to the SharePoint site itself. Here we’ll connect to the admin center and then query the site.
$AdminCenterUrl = "https://yourtenant-admin.sharepoint.com"
Connect-PnPOnline -Url $AdminCenterUrl -InteractiveThe -Interactive parameter opens a modern sign-in window and works well with MFA.
Here is an example of another way to connect to a SharePoint site using PnP PowerShell.
#connected site into Pnp PowerShell
Connect-PnPOnline -Url "https://szg52.sharepoint.com/sites/CollaborativeCore" -Credentials (Get-Credential)Step 2: Get the site and owner
$SiteUrl = "https://yourtenant.sharepoint.com/sites/YourSiteName"
$site = Get-PnPTenantSite -Identity $SiteUrl
$site.OwnerHere is an example:
#Get site owner using PnP PowerShell
$site = Get-PnPTenantSite -Url "https://szg52.sharepoint.com/sites/CollaborateHubSolutions"
$site.OwnerYou can see the screenshot below:

This gives you the same owner value but using PnP PowerShell. It’s handy when your scripts are already PnP-based.
Check out Get SharePoint Site Members Using PowerShell
Get Site Owner for a Microsoft 365 group-connected SharePoint Site (PowerShell + AzureAD)
For a Microsoft 365 group-connected team site, the true owners are the owners of the underlying Microsoft 365 group, not just the old “site collection owner” property.
We’ll use SharePoint PowerShell to get the SharePoint site and its group ID, then AzureAD to resolve the group owners.
Step 1: Connect to SharePoint and AzureAD
$AdminCenterUrl = "https://yourtenant-admin.sharepoint.com"
# One credential prompt for both
$Cred = Get-Credential
Connect-SPOService -Url $AdminCenterUrl -Credential $Cred
Connect-AzureAD -Credential $CredStep 2: Get the group owners for a specific site
Here is the PowerShell script to get the group owners for a specific SharePoint site.
$SiteUrl = "https://yourtenant.sharepoint.com/sites/YourGroupSite"
$site = Get-SPOSite -Identity $SiteUrl
$groupOwners = Get-AzureADGroupOwner -ObjectId $site.GroupId |
Select -ExpandProperty UserPrincipalName
$groupOwnersThis returns a list of UPNs for all owners of the Microsoft 365 group connected to that site.
If you prefer a single string (for reports):
$groupOwners -join "; "Here is an example:
$site = Get-SPOSite -Identity "https://szg52.sharepoint.com/sites/CollabNexus"
Get-AzureADGroupOwner -ObjectId $site.GroupID | Select -ExcludeProperty UserPrincipalNameYou can see the exact output in the screenshot below:

This is very useful when you want to email all owners of a Teams-connected site or build an ownership report.
Check out Get Site Template in SharePoint Using PowerShell
Get Site Owners for All SharePoint Sites in the Tenant (report to CSV)
In real life, you rarely check just one site. You usually want a tenant-wide report of all the SharePoint sites and their owners.
Here’s the pattern:
- Get all sites using
Get-SPOSite. - For each site:
- If it’s group-connected (template starts with
GROUP), get owners from AzureAD. - Else, fallback to the
Ownerproperty from SharePoint.
- If it’s group-connected (template starts with
- Store results in an array and export to CSV.
Script: All site owners (classic + group) with CSV export
# Variables
$AdminCenterUrl = "https://yourtenant-admin.sharepoint.com"
$CsvPath = "C:\Temp\SiteOwnersReport.csv"
# Connect to SharePoint Online and Azure AD
$Cred = Get-Credential
Connect-SPOService -Url $AdminCenterUrl -Credential $Cred
Connect-AzureAD -Credential $Cred | Out-Null
# Get all site collections
$sites = Get-SPOSite -Limit ALL
$siteOwners = @()
foreach ($site in $sites) {
Write-Host "Processing:" $site.Url -ForegroundColor Cyan
if ($site.Template -like "GROUP*") {
# Microsoft 365 Group-connected site
$owners = Get-AzureADGroupOwner -ObjectId $site.GroupId |
Select -ExpandProperty UserPrincipalName
$ownersText = $owners -join "; "
}
else {
# Non-group site: use Owner property
$ownersText = $site.Owner
}
# Build object for report
$siteOwners += [PSCustomObject]@{
"Site Title" = $site.Title
"URL" = $site.Url
"Owner(s)" = $ownersText
"Template" = $site.Template
}
}
# Output to screen (optional)
$siteOwners
# Export to CSV
$siteOwners | Export-Csv -Path $CsvPath -NoTypeInformation
Write-Host "Site owners report exported to $CsvPath" -ForegroundColor GreenYou end up with a CSV containing each SharePoint site and its current owners, which you can slice and dice in Excel.
Check out Add SharePoint Online List Items Using PowerShell
Get Site Owners for all SharePoint Sites using PnP PowerShell
If your environment standardizes on PnP PowerShell, you can build a similar report with Get-PnPTenantSite and Get-PnPMicrosoft365GroupOwners.
Script: All site owners using PnP
# Variables
$AdminCenterUrl = "https://yourtenant-admin.sharepoint.com"
$CsvPath = "C:\Temp\PnP_SiteOwnersReport.csv"
# Connect to admin center with PnP
Connect-PnPOnline -Url $AdminCenterUrl -Interactive
# Get all site collections
$siteCollections = Get-PnPTenantSite -Detailed
$siteOwners = @()
foreach ($site in $siteCollections) {
Write-Host "Processing:" $site.Url -ForegroundColor Cyan
if ($site.Template -like "GROUP*") {
# Group-connected site: get Microsoft 365 group owners
$owners = Get-PnPMicrosoft365GroupOwners -Identity $site.GroupId |
Select -ExpandProperty Email
$ownersText = $owners -join "; "
}
else {
# Non-group site: use Owner property
$ownersText = $site.Owner
}
$siteOwners += [PSCustomObject]@{
"Site Title" = $site.Title
"URL" = $site.Url
"Owner(s)" = $ownersText
"Template" = $site.Template
}
}
$siteOwners | Export-Csv -Path $CsvPath -NoTypeInformation
Write-Host "PnP site owners report exported to $CsvPath" -ForegroundColor GreenThis gives you the same kind of CSV but using PnP-only cmdlets, which many admins find easier to maintain.
Conclusion
In this tutorial, I explained how to find the right SharePoint site owner using PowerShell and PnP PowerShell. Here we saw, how to get the owner for a single SharePoint site or even generate a complete report for all SharePoint sites in your tenant.
You may also like the following tutorials:
- Connect-SPOService : current site is not a tenant administration site.
- Get SharePoint Site Storage Size Using PowerShell

After working for more than 18 years in Microsoft technologies like SharePoint, Microsoft 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (12 times). I have also worked in companies like HP, TCS, KPIT, etc.