Connect to Exchange Online using PowerShell
1. If you haven't already, install the Exchange Online PowerShell Module according to your OS. Follow the instructions provided by Microsoft in this article.
2. Open the PowerShell ISE as Administrator and execute the following command:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
3. Run the following command, type your user ID and password in the Windows PowerShell Credential Request, and click OK.
$Cred=Get-Credential
4. Connect to Exchange Online by running the following command:
Connect-ExchangeOnline -Credential $Cred
5. Copy and run the following script, adjusting the filters for the specific user you want to report on and specifying the desired path for the CSV file output. Using this PowerShell script, you can get a list of shared mailbox names and members’ permissions.
Get-Mailbox -RecipientTypeDetails SharedMailbox -ResultSize Unlimited |
Get-MailboxPermission |
Select-Object Identity, User, AccessRights |
Where-Object { $_.User -like '*@*' } |
Export-Csv -Path C:\Temp\sharedfolders.csv -NoTypeInformation
6. Review the created CSV report; the identity column contains the names of the shared mailbox, the user column lists members of the shared mailbox, and the Access Rights column contains the permissions level:
7. Terminate your session with the following cmdlet:
Disconnect-ExchangeOnline -Confirm:$false
- Run Netwrix Auditor → Navigate to "Reports" → Expand the "Exchange Online" section→ “Exchange Online State-in-Time”→ Select "Mailboxes Accessible by Non-Owners" → Click "View".
- Set “Mailbox Type” to “Shared Mailbox” → Click “View Report”. Note that you can also search the report using the relevant fields.
- To check the detailed permissions on delegates and their rights, click “Delegates”: