How to integrate outlook calendar API into React JS application?

Abhimanyu Soni 1 Reputation point
2022-12-15T11:17:21.943+00:00

Actually when I log in to the Microsoft online login with this API https://login.microsoftonline.com/{tanent_id}/oauth2/v2.0/token and use the token response into this API headers https://graph.microsoft.com/v1.0/me/events to add an event into the outlook calendar then I found this kind of error.270987-image-2022-12-15t11-06-01-633z.png

Is this a token error? Or How to solve it? I am working on a React JS app to integrate outlook calendar.

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

1 answer

Sort by: Most helpful
  1. Shivam Dhiman 6,076 Reputation points
    2022-12-15T23:19:34.807+00:00

    Hi @Abhimanyu Soni

    I am able to replicate the same scenario. Generally, this error - "Resource could not be discovered" - occurs when users are not assigned with Exchange license, or the mailbox is not configured for them.

    271080-b1.png

    After providing license to the user, I am able to get the events for this user.

    271183-b2.png

    Please make sure your mailbox is not inactive, soft-deleted, or is hosted on-premise.

    Hope this helps.

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


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.