Check Mailbox Permissions for a User

Check who has permissions to access a specific mailbox. Use the Connect-ExchangeOnline function to use this code.

Get-MailboxPermission -Identity "user@yourdomain.com" | Select-Object User, AccessRights