GRAPH API - get user mailbox forbidden access error

Daniel Cieckiewicz 0 Reputation points
2024-02-06T14:19:06.95+00:00

Hello, I would like to get and then set shared mailbox settings. I would like to get mailbox settings first, but I can't overcome the forbidden access problem. https://graph.microsoft.com/v1.0/users/******@MyTenant.onmicrosoft.com/messages I am using the request from above. I granted permissions in Modify Permissions tab. Should I provide some Request headers or anything else to make it work? Error:

{
    "error": {
        "code": "ErrorAccessDenied",
        "message": "Access is denied. Check credentials and try again."
    }
}
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,309 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Vasil Michev 115.7K Reputation points MVP
    2024-02-06T17:13:02.3+00:00

    You cannot use the Delegate permissions model to access or configure other user's settings. Use Application permissions instead.

    0 comments No comments

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.