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.
| Method | Best fit |
|---|---|
| PowerShell | A CSV with 1 row for each address of every mail-enabled recipient in 1 tenant. |
| Admin centre | Reading the addresses of 1 mailbox. |
| Altivane | Recommended 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.
# Install once, if the module is not already installed.
Install-Module ExchangeOnlineManagement -Scope CurrentUser$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.
Import-Csv ./email-addresses.csv |
Where-Object { $_.Domain } |
Group-Object Domain |
Sort-Object Count -Descending |
Select-Object Count, NameName 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
- Open the Exchange admin centre for the correct tenant.
- Go to Recipients > Mailboxes and select the mailbox.
- Under General, find Email addresses and select Manage email address types.
- Read the list. The default reply address, which is the primary SMTP address, is shown in bold.
- 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.
Option 3 ยท Recommended for regular address reviews
Run Altivane's Email Addresses report
- Open Altivane and choose the tenant.
- Run the Email Addresses report for Exchange Online.
- Open the Excel workbook the run wrote.
- Read its table: Name, Type, Status, Address, Kind, Domain, Accepted domain, Primary address and Note. Address domains lists each domain with its Primary addresses, Aliases and Recipients.
The report reads recipients with the same command as the script and lists 1 row for each address, leaving out SharePoint's internal SPO: addresses. An SMTP address in a domain that is not an accepted domain is marked Warning, with a note that mail to it never arrives. Contacts and mail users are not judged, since their primary address is outside the organisation by design. If the accepted domains cannot be read, the Accepted domain and Status cells stay blank and the run logs a warning.
Contact usCommon 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.