Calendarview using Application permission and getting "Access is denied. Check credentials and try again."

Valter 20 Reputation points
2023-02-03T15:36:00.4066667+00:00

I follow this guide https://learn.microsoft.com/en-us/graph/use-postman

to configure an App in Azure portal with "Application permission" and test it with Postman.

These are the permissione configured:

immagine

I'm getting Token correctly.

Then try these requests:

https://graph.microsoft.com/v1.0/users -> OK

https://graph.microsoft.com/v1.0/users?$filter=startswith(userPrincipalName,'l') -> OK

https://graph.microsoft.com/v1.0/users/{ID | Principal name}/calendars -> OK

https://graph.microsoft.com/v1.0/users/{ID | Principal name}/calendarView?startDateTime=2023-01-11T19:00:00-08:00&endDateTime=2023-01-21T19:00:00-08:00 -> ERROR

{
    "error": {
        "code": "ErrorAccessDenied",
        "message": "Access is denied. Check credentials and try again."
    }
}
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

Answer accepted by question author
  1. Shivam Dhiman 6,086 Reputation points
    2023-02-03T16:34:31.4133333+00:00

    Hi @Valter

    Based on my observation from previous cases, I will suggest, try to remove & revoke all permission of the specific app and grant the required permissions again, then execute the Graph API.
    Also, you can decode your token using JWT.IO and see in roles section if you have permission in your token.
    Please let me know if you are still facing this issue.

    Hope this helps.

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

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.