Feb 24 2020 01:31 PM
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.
Feb 25 2020 01:23 AM
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.
Feb 25 2020 02:00 AM - edited Feb 25 2020 03:32 AM
@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 }
}
}