API get find rooms Access is denied

Room Reservation 20 Reputation points
2024-12-11T13:35:41.4033333+00:00

In Microsoft Graph Explorer, the API call to "Find Rooms" successfully retrieves the rooms, but when my service makes the same "Find Rooms" call, it fails to retrieve the rooms.
Response is

"error": {
        "code": "ErrorAccessDenied",
        "message": "Access is denied. Check credentials and try again."
    }
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,296 questions
{count} votes

Accepted answer
  1. Yakun Huang-MSFT 10,555 Reputation points Microsoft External Staff
    2024-12-12T06:42:04.54+00:00

    Hello Room Reservation,

    Thank you for reaching out to Microsoft Support!

    For your question, we tested it in both Graph Explorer and Postman, and the results were successful. The test results are as follows:

    Screenshot 2024-12-12 063528

    For your error message, please check the following:

    1. According to the documentation, this endpoint only supports delegated permissions, so grant the delegated permissions User.Read when granting permissions.

    User's image

    1. When getting the token, use auth code flow to get the token since we are using delegated permissions.
    2. You can parse the obtained tokens in jwt.ms and check whether you have the User.Read permission in scp properties.

    User's image

    1. Use the beta version when accessing this endpoint, which does not currently support v1.0.

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote it. 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 Answers by the question author, which helps users to know the answer solved the author's problem.