Graph-API GET /users/{id | userPrincipalName}/calendars

Somit Mitra 1 Reputation point
2021-09-15T23:52:49.067+00:00

Can't access all calendars for my users

Trying with Graph Explorer
[https://graph.microsoft.com/v1.0/me/calendars] just works fine and gives me the colanders.

Whereas [ https://graph.microsoft.com/v1.0/users/UPAN/calendars ] always giving 404 status code
"code": "ErrorItemNotFound",
"message": "The specified object was not found in the store.",

But when the user opened his calendar, he was able to see all three calendars from his Outlook.

Need help

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

1 answer

Sort by: Most helpful
  1. Shweta Choudhary 601 Reputation points Microsoft Employee
    2021-09-17T18:24:38.193+00:00

    Thank you for reaching out.

    Couple of things to check here -

    1. When you are trying to get users' calendar, you are using user id or userPrincipalName properly in your Get request.
    2. Make sure you have the necessary permission to call this API. Refer documentation here for this.
    3. Check your access token on https://jwt.ms and see if your token has all the necessary scopes.

    If you are still facing issues, please share your client-request-id and timestamp so that we can look into it.

    Thanks.

    1 person found this answer helpful.