How to know if a user can book a room

Olivier R 1 Reputation point
2023-04-13T20:06:58.3866667+00:00

I use Microsoft Graph API to manage room booking. Some rooms have restrictions and can be booked by a liste users & groups. How can I check with Microsoft Graph if a given user is allowed to book a room ?

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2023-04-14T02:27:26.99+00:00

    Hello olivierraveneau,

    Thanks for reaching out!

    Currently using Microsoft Graph API there is no direct API endpoint to check if a user is allowed to book a room based on permissions in Microsoft Exchange or Outlook. However, you can still achieve this indirectly by following these steps:

    • Get the list of users and groups that are granted booking permissions for the room using the GET /me/findRooms and GET /users/{id}/findRooms API endpoint.
    • Check if the user or any of the groups the user belongs to is present in the list of users and groups that are granted booking permissions for the room.

    Reference Link:
    https://learn.microsoft.com/en-us/graph/api/user-findrooms?view=graph-rest-beta&tabs=http

    Note: APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported.

    Hope this helps.

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

    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.