Unable to get calendar events using Microsoft graph: 403 error access denied

Stephen Gray 40 Reputation points
2023-02-10T23:59:23.48+00:00

I am making calls to the Microsoft Graph "/users/{id}/events" endpoint as an apllication with no logged in user but getting 403 forbidden
"error": {
"code": "ErrorAccessDenied",
"message": "Access is denied. Check credentials and try again."
}
}

I have encountered this error and got stuck, I am accessing user/{email}/events. I have already granted all the Application permissions but still the error occurs.
How do I resolve this issue in MS Graph?

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

Accepted answer
  1. Siddharth Gautam 860 Reputation points
    2023-02-11T00:34:35.19+00:00

    Hello Stephen Gray,

    Thanks for reaching out.

    Try removing & revoking all Calendar related permissions of the application and grant only the required (or least privileged) application permissions to execute List Events Graph API [Calendar.Read].

    You can follow the below thread as well.

    https://learn.microsoft.com/en-us/answers/questions/1161426/erroraccessdenied-message-access-is-denied-check-c

    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.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Zehui Yao_MSFT 5,876 Reputation points
    2023-02-13T09:47:33.7566667+00:00

    Hi @Stephen Gray , you can decode your access token in jwt.ms to ensure that the token contains the correct permissions. You can also share it in the comments so that we can help you analyze together.

    Best Wishes.


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.