Get who has permission on the all the mailbox in Office 365
Get permission of all the mailbox (shared, Room, equipment)
In Office 365 when you get Full mailbox permission of a user accounts it return the SAM account name which is unfamiliar for the tenant and hard to identity who is having permission on the mailbox.
This script gets the mailbox permission and convert the SAM account to Name to User Display name and export the data to csv file.
Copy the Code below to txt file and save as PS1.