Shared Mailbox handling with Microsoft Graph

Pascal Burkard 1 Reputation point
2020-08-28T08:50:50.513+00:00

Hello

I want to access a shared mailbox with Microsoft Graph. I am currently trying to get a response with Graph Explorer. What I found so far to access a shared mailbox is the following GET request: "https://graph.microsoft.com/v1.0/users/{sharedmailboxmailaddress}/messages" as a respond I get:

{
"error": {
"code": "ErrorAccessDenied",
"message": "Access is denied. Check credentials and try again.",
"innerError": {
"date": "2020-08-28T08:39:00",
"request-id": "ba9bddb6-601e-4d37-a787-3e2e474ce72b"
}
}
}

My user has full access to this shared mailbox - e.g. I can read/write the mailbox in Outlook.
To consent the permission (modify permissions) is not an option because I am not an admin of the organization - I think I would need the permission "Mail.ReadWrite.Shared".

Is there a way without consenting the permission because my user has full access to the shared mailbox?

I am looking forward to read an answer :)

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
24,187 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Saurabh Sharma 23,841 Reputation points Microsoft Employee
    2020-08-31T19:59:04.413+00:00

    @PascalBurkanrd-5033 You need to add and consent to required permissions for the user on Graph Explorer page by selecting the permissions from "Settings Gear" on left side -
    21661-image.png

    Select Mail.Read.Shared from the list of permissions and consent it by accepting it as it requires an user consent.
    21671-image.png

    You will then get redirected to the consent page as shown below -
    21681-image.png

    Once consented you can then access the shared mailbox by calling -
    https://graph.microsoft.com/v1.0/users/{sharedmailboxmailaddress}/messages
    21691-image.png


  2. Merlin Beedell 21 Reputation points
    2022-02-17T17:48:49.933+00:00

    Can I use Graph to obtain a list of Shared Mailboxes that I have permission to access? Or is this still only available via PowerShell?


Your answer

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