đź”§ New: User Management Graph PowerShell Toolkit

Simplify user tasks like bulk creation, updates, password resets, deletions, license checks & more — all from one place.

🚀 Launch Toolkit

How to Generate and Email Microsoft 365 Unified Group Owners Report?

Keeping track of Microsoft 365 group owners is essential for delegation clarity, compliance audits, and efficient governance. But when you’re managing a large number of Microsoft 365 Groups—especially Unified Groups—doing it manually is both time-consuming and error-prone. In this guide, we’ll show you how to automate the generation and emailing of a Microsoft 365 Unified Group Owners Report using Graph PowerShell.


Who Are Microsoft 365 Unified Group Owners?

Microsoft 365 Unified Groups are collaborative objects that combine features from Outlook, SharePoint, Teams, Planner, and more. Each Unified Group has one or more owners—users responsible for managing group membership, settings, and oversight. These owners act as administrators for their respective groups.

Identifying and tracking these owners is crucial for internal audits, compliance requirements, and avoiding orphaned groups that have no active manager.


Why Generate Microsoft 365 Unified Group Owners Report Using PowerShell?

Here’s why scripting this report is not just useful—but essential:

  • Manual reporting is inefficient: An admin would need to manually inspect each group, determine if it’s a Unified Group, and then identify its owners. This is cumbersome—especially in larger environments.
  • Not easy for beginners: Unified Groups look like just another type of group in Microsoft 365 unless you're familiar with the GroupTypes property.
  • Auditing & Compliance: Knowing who’s responsible for each group is vital for security, ownership validation, and governance reviews.
  • Automated delivery: This script not only generates the report, but emails it automatically to the admin—saving even more time.

How to Generate & Email Microsoft 365 Unified Group Owners Report Using PowerShell?

Here’s a complete script that:

  • Connects to Microsoft Graph
  • Fetches Unified Groups
  • Retrieves their owners
  • Builds an HTML report
  • Emails the report to a specified admin
# Connect to Microsoft Graph
Connect-MgGraph -Scopes "Group.Read.All", "User.Read.All", "Mail.Send"

# Define admin mailbox to send report
$adminEmail = "samadmin@7xh7fj.onmicrosoft.com"  # Replace with your actual admin email
$fromUser = "samadmin@7xh7fj.onmicrosoft.com"    # The mailbox from which the email will be sent
                                                                            
# Fetch all Unified Groups
$groups = Get-MgGroup -All -Property Id, DisplayName, GroupTypes | Where-Object {
$_.GroupTypes -contains "Unified"
}
                                                                            
Write-Host "Found $($groups.Count) unified groups. Collecting owners..." -ForegroundColor Cyan
                                                                            
# Build HTML table (escaped for documentation)
$html = "<html><body>"
$html += "<h3>Microsoft 365 Group Owners Report</h3>"
$html += "<table border='1' cellpadding='5' cellspacing='0'>"
$html += "<tr><th>Group Name</th><th>Owner Name</th><th>Owner Email</th></tr>"

foreach ($group in $groups) {
    $owners = Get-MgGroupOwner -GroupId $group.Id -ErrorAction SilentlyContinue
                                
    if ($owners) {
        foreach ($owner in $owners) {
            $ownerName = $owner.AdditionalProperties.displayName
            $ownerEmail = $owner.AdditionalProperties.mail
            $html += "<tr><td>$($group.DisplayName)</td><td>$ownerName</td><td>$ownerEmail</td></tr>"
        }
    } else {
        $html += "<tr><td>$($group.DisplayName)</td><td colspan='2'>No owner assigned</td></tr>"
    }
}

$html += "</table></body></html>"

# Construct the email body
$emailBody = @{
    Message = @{
    Subject = "Microsoft 365 Group Owners Report"
    Body = @{
        ContentType = "HTML"
        Content = $html
    }
    ToRecipients = @(
    @{
        EmailAddress = @{
        Address = $adminEmail
    }
    }
    )
    }
    SaveToSentItems = $true
}

# Send the email
Send-MgUserMail -UserId $fromUser -BodyParameter $emailBody

Write-Host "`nâś… Group owner report emailed to $adminEmail" -ForegroundColor Green
                                        

Script Breakdown:

  • Connect-MgGraph: Authenticates with the necessary delegated scopes: Group.Read.All, User.Read.All, Mail.Send
  • Get-MgGroup: Retrieves all groups and filters for those with GroupTypes containing "Unified"
  • Get-MgGroupOwner: Retrieves owner(s) of each Unified Group
  • Send-MgUserMail: Builds and sends the report in HTML format to the admin’s inbox

Possible Errors You Might Encounter

Here are some common issues you might face and how to fix them:

Error Cause Fix
Access Denied Missing Graph API permissions Ensure you’ve granted and consented to the required scopes (Group.Read.All, User.Read.All, Mail.Send)
Send-MgUserMail fails The fromUser mailbox is not provisioned Make sure the sender mailbox is licensed and active
Empty report You don’t have any Unified Groups or script filtered out all others Double-check group types using `Get-MgGroup.

Conclusion

Automating Microsoft 365 Unified Group ownership reporting can greatly reduce administrative burden and support compliance initiatives. This PowerShell script lets you efficiently identify group owners and receive an HTML report directly via email—turning a tedious task into a one-click solution.

With Microsoft Graph PowerShell and a little automation, managing your M365 environment becomes both smarter and simpler.


Did You Know? Managing Microsoft 365 applications is even easier with automation. Try our Graph PowerShell scripts to automate tasks like generating reports, cleaning up inactive Teams, or assigning licenses efficiently.

Ready to get the most out of Microsoft 365 tools? Explore our free Microsoft 365 administration tools to simplify your administrative tasks and boost productivity.

© Your Site Name. All Rights Reserved. Design by HTML Codex