Forum Discussion
Any way to get a list of every mailbox and who has rights to it?
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
Kelemvor333 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 }
}
}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.