Access to calendar - 401 with message: Unauthorized or 403 with message: Forbidden

BB 1 Reputation point
2021-02-08T11:11:54.24+00:00

Hi,

I have created a application on Azure AD.

With a sample daemon-application I've got the users list.

I'm trying to get access to users calendar but getting 401 with message: Unauthorized or 403 with message: Forbidden

API URL:

  1. https://graph.microsoft.com/v1.0/me/calendars
  2. https://graph.microsoft.com/v1.0/me/events?$select=subject,body,bodyPreview,organizer,attendees,start,end,location

I've provided Application level Calendars.ReadWrite permission and also granted admin consent.

Kindly advice.

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

2 answers

Sort by: Most helpful
  1. Deva-MSFT 2,266 Reputation points Microsoft Employee
    2021-02-09T06:42:14.74+00:00

    You need to follow the steps as provided in the documentation to access multiple user calendars. Also i would suggest you to test the same using POSTMAN as well.

    0 comments No comments

  2. BB 1 Reputation point
    2021-02-09T17:49:35.643+00:00

    @Deva-MSFT The steps in the documentation is followed. Sure, will check in postman too.

    Can it be that users calendar being not available/enabled or something of that sort? Is that even possible if he has a microsoft account?

    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.