Locating, Viewing and Managing Addresses and Aliases in MS 365

Enter the following command in powershell after connecting to 365. This will locate an alias within your exchange online tenant, and tell you what mailbox user or group it's attached to.

Get-recipient | Where {$_.EmailAddresses -match "user@domain.com"} | select Identity, DisplayName, RecipientType

To view all aliases within the tenant:

Get-Mailbox | Select-Object DisplayName,@{Name=“EmailAddresses”;Expression={$_.EmailAddresses |Where-Object {$_ -LIKE “SMTP:*”}}} | Sort | Format-List

Export all aliases within the tenant to CSV:

Get-Mailbox | Select-Object DisplayName,@{Name=“EmailAddresses”;Expression={$_.EmailAddresses |Where-Object {$_ -LIKE “SMTP:*”}}} | Sort | Export-Csv email-aliases.csv

Get all email addresses and export to CSV, includes primary and alias addresses.

Get-Recipient -ResultSize Unlimited | select DisplayName,RecipientType,EmailAddresses | Export-Csv email-recipients.csv