Exchange Online reporting

How to export all email addresses in Exchange Online

Export every recipient's email addresses with Exchange Online PowerShell, view 1 mailbox's addresses in the Exchange admin centre, or run Altivane's Email Addresses report for 1 row per address.

By the Published Updated

To export all email addresses in Exchange Online, read every recipient with Get-Recipient and write out each entry of its EmailAddresses property: the primary address and every alias. The Exchange admin centre shows 1 mailbox's addresses at a time, so a tenant-wide list needs PowerShell or a report. Microsoft 365 groups and soft-deleted recipients are left out unless a command asks for them.

Choose the method that fits the job
MethodBest fit
PowerShellA CSV with 1 row for each address of every mail-enabled recipient in 1 tenant.
Admin centreReading the addresses of 1 mailbox.
AltivaneRecommended for regular address reviews, with domains the tenant does not accept flagged and a workbook to keep.

Before you start

Use an account in the Organization Management or Recipient Management role group, which Microsoft lists for recipients in Exchange Online. Members of View-Only Management can view the configuration of recipients.

The script reads addresses as Exchange holds them when it runs, so the CSV is a snapshot. It lists mailboxes, mail users, contacts and distribution groups. Get-Recipient returns 1000 results unless told otherwise, so the script passes -ResultSize Unlimited. The examples read and export and change nothing.

Option 1

Export all email addresses with PowerShell

Install the module once, then connect, read every recipient and write 1 row for each address. Any error stops the script before it writes a partial CSV.

PowerShell
# Install once, if the module is not already installed.
Install-Module ExchangeOnlineManagement -Scope CurrentUser
PowerShell
$ErrorActionPreference = 'Stop'
Connect-ExchangeOnline
try {
    $recipients = Get-Recipient -ResultSize Unlimited
    $report = @(foreach ($recipient in $recipients) {
        foreach ($proxy in $recipient.EmailAddresses) {
            $parts = ([string]$proxy) -split ':', 2
            $type = if ($parts.Count -eq 2) { $parts[0] } else { 'smtp' }
            $address = $parts[-1]
            if ($type -ceq 'SMTP') { $kind = 'Primary' }
            elseif ($type -ceq 'smtp') { $kind = 'Alias' }
            else { $kind = $type.ToUpper() }
            $domain = if ($type -ieq 'smtp') { ($address -split '@')[-1] } else { '' }
            [pscustomobject]@{
                Name = $recipient.DisplayName
                RecipientType = $recipient.RecipientTypeDetails
                PrimaryAddress = [string]$recipient.PrimarySmtpAddress
                Kind = $kind
                Address = $address
                Domain = $domain
            }
        }
    })
    if ($report.Count -eq 0) {
        Write-Output 'No recipient email addresses were found.'
    } else {
        $report | Sort-Object Name, @{ Expression = { $_.Kind -ne 'Primary' } }, Address |
            Export-Csv -Path './email-addresses.csv' -NoTypeInformation -Encoding utf8
        Write-Output "$($report.Count) email addresses exported."
    }
} finally {
    Disconnect-ExchangeOnline -Confirm:$false
}

The CSV has 1 row for each address, with the primary address first for each recipient. Kind is Primary for the entry that starts with SMTP: and Alias for each smtp: entry. Other address types keep their prefix, such as X500. To narrow it, add -RecipientTypeDetails SharedMailbox or a -Filter to Get-Recipient. For Microsoft 365 groups, use -RecipientTypeDetails GroupMailbox. For soft-deleted recipients, add -IncludeSoftDeletedRecipients to a command with -RecipientTypeDetails.

Count addresses by domain

Run this after the export. It only reads the CSV.

PowerShell
Import-Csv ./email-addresses.csv |
    Where-Object { $_.Domain } |
    Group-Object Domain |
    Sort-Object Count -Descending |
    Select-Object Count, Name

Name is the domain. Get-AcceptedDomain lists the domains the tenant accepts; it needs the Organization Management role group.

Option 2

Check a mailbox's email addresses in the admin centre

  1. Open the Exchange admin centre for the correct tenant.
  2. Go to Recipients > Mailboxes and select the mailbox.
  3. Under General, find Email addresses and select Manage email address types.
  4. Read the list. The default reply address, which is the primary SMTP address, is shown in bold.
  5. Close the pane without choosing Add email address type, Edit, Remove or Save, so nothing changes.

This suits 1 mailbox, such as before an offboarding. It does not suit an export.

Common questions

Why does Get-EXORecipient show no email addresses?

It returns only the properties in its Minimum property set unless you ask for more, and Microsoft's property sets for it do not list EmailAddresses. The script uses Get-Recipient, which returns the full recipient. To list mailboxes only, Get-EXOMailbox returns EmailAddresses and PrimarySmtpAddress by default.

Which address is the primary one?

The entry with uppercase SMTP: is the primary SMTP address, the one people see as the default reply address. Lowercase smtp: entries are the other SMTP addresses, and Microsoft lists X400 and X500 as further types.

How do I check that every address is in a domain the tenant accepts?

Compare the Domain column with the list from Get-AcceptedDomain, or let Altivane mark the addresses that are not. To check whether a domain signs its mail, see how to check DKIM status in Exchange Online.

Microsoft references

Technical references checked on 5 October 2026. The example scripts have been reviewed and syntax checked; they have not been run against a live tenant.

Talk to us about Altivane

Questions, or pricing? Get in touch.

Contact us