Connect to 365 via powershell

$UserCredential = Get-Credential

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

Import-PSSession $Session -DisableNameChecking.

 

Get-Mailbox | Get-MailboxPermission -User userA
UserA would be the user that you want to know for instance; What mailboxes does Matt have access to would be as follows:
Get-Mailbox | Get-MailboxPermission -User matt