Access Denied on Microsoft Graph Calendar

PSADev 0 Reputation points
2023-05-12T14:25:43.9166667+00:00

Hi there
I am getting an Access Denied error when trying to retrieve my calendar events. I get the same error when trying to retrieve the details of the calendar itself.

I tried various permissions(plus removing and re-adding) along with multiple ways of calling the results but I'm not winning.

Your assistance will be greatly appreciated.

Methods tried:

GraphServiceClient.Me.Calendar.Events.Request().Top(10).GetAsync()
GraphServiceClient.Users["{email}"].Calendar.Events.Request().Skip(page).Top(10).GetAsync()

My permissions
User's image

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,540 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Anonymous
    2023-05-15T09:36:16.0633333+00:00

    Hello,

    Thanks for reaching out!

    It sounds like you are having some trouble accessing your calendar events and details. An "Access Denied" error typically indicates that the authentication credentials you are using to access the resource do not have the necessary permissions.

    Here are some suggestions for troubleshooting the issue:

    Make sure that your application or script is properly authenticated and authorized to access the Microsoft Graph API. You may need to obtain a new access token or refresh your existing token.

    Verify that the user account you are using to authenticate has the necessary permissions to access the calendar events and details. You may need to check the Microsoft Graph API permissions for your application and ensure that the required permissions are granted.

    Check the Microsoft Graph API documentation for any known issues or limitations with retrieving calendar events and details. There may be some additional steps or workarounds required for certain scenarios.

    Try using the Microsoft Graph Explorer to test your API requests and ensure that they are properly formatted and authenticated. This can help you identify any issues with your requests and narrow down the source of the error.

    1. If you are still experiencing issues, please raise a support ticket with Microsoft.

    Hope this helps.

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

    0 comments No comments

  2. CarlZhao-MSFT 36,891 Reputation points
    2023-05-16T10:20:05.9366667+00:00

    Hi @PSADev

    Make sure your global administrator has consented the Calendars.Read permission.

    15

    Debug code:

    User's image

    Hope this helps.

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