Sometimes there are certain rooms that are only bookable by a subset of the users at a company. In these cases, is there any way through the Microsoft Graph API to determine if the current user can book a room? We would like to do this without trying to create a "dummy event" with the room added using delegated permission on behalf of the user, since this would result in an email being sent to the user's mailbox about the booking etc (plus it's not a very clean solution). We have earlier tried to access the room's free/busy periods through me/calendar/getSchedule
, as well as events through /users/{id | userPrincipalName}/calendar/events
, checking if the status code returned was 403 (Forbidden). This however does not seem to reliably map to whether or not that same user can book the room (just to be clear, we are using Calendars.Read.Shared
delegated permission).
If there is no way through MS-graph (or another Microsoft API) to determine if the current user can book a room, is there some other way to determine this programmatically?
Edit: The screenshot below shows where you can edit the setting by opening the room's mailbox as a delegate, and set the scheduling permissions (you can also do the equivalent through Powershell).
Here Maria Lee is the only one with permission to book the room.