Friday, February 22, 2019

Allow a User to Access All O365 Mailboxes

Connect to O365 using powershell then issue the following, replacing the user with a proper user:

Get-Mailbox -ResultSize unlimited -Filter {(RecipientTypeDetails -eq 'UserMailbox')} | Add-MailboxPermission -User SOMEUSER@SOMEDOMAIN.COM -AccessRights FullAccess -InheritanceType all

To turn it off, change Add-MailboxPermission to Remove-MailboxPermission

Get-Mailbox -ResultSize unlimited -Filter {(RecipientTypeDetails -eq 'UserMailbox')} | Remove-MailboxPermission -User SOMEUSER@SOMEDOMAIN.COM -AccessRights FullAccess -InheritanceType all