2
votes

I've been searching with no luck for a way to find/list all shared mailboxes in Exchange Online via webservice. Apparently Office 365 Graph does not support this yet, as posted in this answer on 2016-06-30: Get Members In Shared Mailboxes office 365

I know I could be using the EWS Managed API https://msdn.microsoft.com/en-us/library/office/jj536567(v=exchg.150).aspx to access the mail items inside a shared mailbox, but unfortunately it seems you have to know the shared mailboxes' names before accessing them.

How do I get a list of all the shared mailboxes a user has access to from some JS?

1

1 Answers

1
votes

It is easy using the Exchange online cmdlets via PowerShell. You can refer the command below to get the shared mailboxes:

$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
Get-Mailbox | where {$_.recipientTypeDetails -eq 'sharedmailbox' }