Are familiar with the Graph Api, typically this is something I would accomplish with that.
Using the Microsoft Graph API, you can obtain the calendar ID of a room. However, before doing so, you need to have proper permissions configured in your Azure AD application. Here are the steps to follow:
- Setup permissions: First, you need to set up permissions in the Azure Portal. Navigate to the Azure Active Directory application associated with your Power App and add the following permissions under 'API permissions' > 'Add a permission' > 'Microsoft Graph':
Calendars.Read or Calendars.ReadWrite
Room.Read.All or Room.ReadWrite.All
- Get Room List: Microsoft Graph API provides the /places API that can be used to get the list of rooms. Here is an example of the API call:
GET https://graph.microsoft.com/v1.0/places/microsoft.graph.room
The response will contain a list of room objects, and from that, you can select the 'address' property of the room you are interested in.
- Get Calendar ID: Use the following Graph API call to get the calendar of a room (or a user):
GET https://graph.microsoft.com/v1.0/users/{room-email}/calendar
Replace {room-email} with the email address of the room you got from step 2. The id property of the response will be the Calendar ID of the room.
You can connect to the graph with these HTTP requests, and parse the JSON responses to get the required values. Remember to handle pagination if you have more rooms than fit in a single response page.
Please note that, this approach requires the logged-in user to have appropriate permissions to read room and calendar information in your organization. Always ensure you're compliant with your organization's privacy and security policies.