Any way to get a list of every mailbox and who has rights to it?

%3CLINGO-SUB%20id%3D%22lingo-sub-1191680%22%20slang%3D%22en-US%22%3EAny%20way%20to%20get%20a%20list%20of%20every%20mailbox%20and%20who%20has%20rights%20to%20it%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1191680%22%20slang%3D%22en-US%22%3E%3CP%3EHowdy%2C%3C%2FP%3E%3CP%3EAt%20various%20times%2C%20we%20grant%20mailbox%20permissions%20to%20people%20temporarily.%26nbsp%3B%20(employee%20on%20extended%20leave%2C%20new%20hire%20needing%20assistance%2C%20etc).%26nbsp%3B%20Sometimes%20that%20temporary%20access%20becomes%20permanent%20when%20someon%20forgets%20to%20go%20take%20the%20access%20away.%3C%2FP%3E%3CP%3EIs%20there%20an%20easy%20way%20to%20get%20a%20list%20of%20every%20mailbox%20on%20our%20tenant%20(shared%20boxes%2C%20personal%20boxes%2C%20etc)%20and%20view%20who%20has%20access%20to%20it%3F%3C%2FP%3E%3CP%3EThanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1191680%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExchange%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExchange%20Server%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1192822%22%20slang%3D%22en-US%22%3ERe%3A%20Any%20way%20to%20get%20a%20list%20of%20every%20mailbox%20and%20who%20has%20rights%20to%20it%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1192822%22%20slang%3D%22en-US%22%3E%3CP%3EThere%20are%20bunch%20of%20scripts%20available%20online%20that%20do%20that%2C%20here's%20one%20of%20mine%3A%26nbsp%3B%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3E%3CA%20href%3D%22https%3A%2F%2Fgallery.technet.microsoft.com%2FOffice-365-Mailbox-c2adf0db%3Fredir%3D0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgallery.technet.microsoft.com%2FOffice-365-Mailbox-c2adf0db%3Fredir%3D0%3C%2FA%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThat's%20for%20Full%20access%20permissions%2C%20I%20have%20similar%20ones%20for%20other%20types%2C%20including%20folder-level%20permissions.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1192878%22%20slang%3D%22en-US%22%3ERe%3A%20Any%20way%20to%20get%20a%20list%20of%20every%20mailbox%20and%20who%20has%20rights%20to%20it%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1192878%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F47110%22%20target%3D%22_blank%22%3E%40Mike%20Boehm%3C%2FA%3E%26nbsp%3BSomethimg%20like%20this%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%24Mbx%20%3D%20Get-Mailbox%20-RecipientTypeDetails%20UserMailbox%2C%20SharedMailbox%20-ResultSize%20Unlimited%20%7C%20Select%20DisplayName%2C%20UserPrincipalName%3CBR%20%2F%3EForEach%20(%24M%20in%20%24Mbx)%20%7B%3CBR%20%2F%3EWrite-Host%20%22Processing%20mailbox%22%20%24M.DisplayName%3CBR%20%2F%3E%24Permissions%20%3D%20Get-MailboxPermission%20-Identity%20%24M.UserPrincipalName%20%7C%20%3F%20%7B%24_.User%20-Like%20%22*%40*%22%20%7D%20%3CBR%20%2F%3EIf%20(%24Null%20-eq%20%24Permissions)%20%7B%3CBR%20%2F%3EWrite-Host%20%22No%20extra%20permissions%20found%20for%22%20%24M.DisplayName%7D%3CBR%20%2F%3EElse%20%7B%3CBR%20%2F%3EForEach%20(%24Permission%20in%20%24Permissions)%20%7B%3CBR%20%2F%3EWrite-Host%20%22Mailbox%20permission%22%20%24Permission.AccessRights%20%22assigned%20to%22%20%24Permission.User%20%7D%3CBR%20%2F%3E%7D%20%3CBR%20%2F%3E%7D%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Super Contributor

Howdy,

At various times, we grant mailbox permissions to people temporarily.  (employee on extended leave, new hire needing assistance, etc).  Sometimes that temporary access becomes permanent when someon forgets to go take the access away.

Is there an easy way to get a list of every mailbox on our tenant (shared boxes, personal boxes, etc) and view who has access to it?

Thanks.

2 Replies
Highlighted

There are bunch of scripts available online that do that, here's one of mine: https://gallery.technet.microsoft.com/Office-365-Mailbox-c2adf0db?redir=0

 

That's for Full access permissions, I have similar ones for other types, including folder-level permissions.

Highlighted

@Mike Boehm Somethimg like this?

 

$Mbx = Get-Mailbox -RecipientTypeDetails UserMailbox, SharedMailbox -ResultSize Unlimited | Select DisplayName, UserPrincipalName
ForEach ($M in $Mbx) {
Write-Host "Processing mailbox" $M.DisplayName
$Permissions = Get-MailboxPermission -Identity $M.UserPrincipalName | ? {$_.User -Like "*@*" }
If ($Null -eq $Permissions) {
Write-Host "No extra permissions found for" $M.DisplayName}
Else {
ForEach ($Permission in $Permissions) {
Write-Host "Mailbox permission" $Permission.AccessRights "assigned to" $Permission.User }
}
}