Report · 1 tool

Mailbox permissions report: Full Access, Send As, Send on Behalf

Summary

Exports every delegated permission on user and shared mailboxes in one file. Run it before a mailbox migration (Send on Behalf never moves on its own) and for access reviews.

Implementation

Choose your tool. Your choice is remembered on other samples.

Exchange Online PowerShell
Connect-ExchangeOnline -ShowBanner:$false
$mailboxes = Get-EXOMailbox -ResultSize Unlimited -RecipientTypeDetails UserMailbox, SharedMailbox -Properties GrantSendOnBehalfTo
$rows = foreach ($m in $mailboxes) {
  Get-EXOMailboxPermission -Identity $m.UserPrincipalName |
    Where-Object { -not $_.IsInherited -and $_.User -notlike "NT AUTHORITY*" } |
    ForEach-Object { [pscustomobject]@{ Mailbox = $m.PrimarySmtpAddress; Delegate = $_.User; Permission = "FullAccess" } }
  Get-EXORecipientPermission -Identity $m.UserPrincipalName |
    Where-Object { $_.Trustee -ne "NT AUTHORITY\SELF" } |
    ForEach-Object { [pscustomobject]@{ Mailbox = $m.PrimarySmtpAddress; Delegate = $_.Trustee; Permission = "SendAs" } }
  foreach ($d in $m.GrantSendOnBehalfTo) {
    [pscustomobject]@{ Mailbox = $m.PrimarySmtpAddress; Delegate = $d; Permission = "SendOnBehalf" } }
}
$rows | Export-Csv .\mailbox-permissions.csv -NoTypeInformation

Prerequisites

  • Exchange Administrator or View-Only Organization Management
  • ExchangeOnlineManagement module 3.x

Output

CSV with Mailbox, Delegate and Permission type.

Related answers

Contributors

AuthorRole
Priyanshu UpadhyaySolution Architect, Microsoft 365 and Azure
Disclaimer. These samples are provided as is, without warranty of any kind. Read and test every script in a non-production tenant before you run it, and run reports before any command that changes or deletes data.