Retrieve list of shared mailbox using Microsoft Graph PowerShell SDK.

David Gómez 6 Reputation points
2021-11-18T20:41:44.193+00:00

Iis it possible to use Microsoft Graph PowerShell SDK commands to list the shared mailboxes of the tenant.
I have tried get-mguser and in the insights class I found the shared attribute, but it seems to have no value.

Does anyone know of a method?

Microsoft Security | Microsoft Graph
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. JanardhanaVedham-MSFT 3,581 Reputation points
    2022-03-09T13:36:45.497+00:00

    Hi @David Gómez ,

    Presently, there is no Microsoft Graph API or Microsoft Graph PowerShell SDK available to list the shared mailboxes of an user. You can submit a feature request idea using this graph developer support link, which will be monitored by Microsoft team and make the enhancements to Microsoft Graph APIs. I will also upvote for you.

    However you can use Exchange Online PowerShell script to achive this requirement and please find the relevent powersheel command and documentation links below :

    Get-Mailbox -RecipientTypeDetails SharedMailbox -ResultSize:Unlimited | Get-MailboxPermission | select identity,user,accessrights  | where { ($_.User -like '*@*')   }  
    

    https://learn.microsoft.com/en-us/exchange/recipients-in-exchange-online/manage-user-mailboxes/use-powershell-to-display-mailbox-information
    https://techcommunity.microsoft.com/t5/office-365/listing-shared-mailboxes-and-members-powershell/m-p/241737

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.


  2. Sanat Ojha 1 Reputation point
    2022-05-26T19:08:13.067+00:00

    Is there any update to support this API?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.