Search code examples
microsoft-graph-apiexchange-online

How can I find the ID of all meeting room calendars?


Environment: Exchange Online and Wordpress

Issue: we are trying to connect and show Meeting Room Calendars to Worpress.

If I go to MS Graph, I can run a simple command to find a ID for my personal calendar. The command is: https://graph.microsoft.com/v1.0/me/calendars

It will return lots of values, the one we need is "id" that is very long, and not a GUID.

The ID value I need, looks like this:

"id": "AAMkADcxMzk2N2Y3LWFjMTktNGY1OS1hYLYwLTI3NzlkZDhMDAwZgBGAAAAAAAPB-v1RThsTKqjr5R_SEg0BwB83cbkVfyiT6pN-8Cf8VcaAAGGAAEGAB84cbkVfyiT6pN-8Cf8VcaAAAARYCdAAA="

I can then use this ID in Wordpress to show the calendar through a integration.

But I need to show the calendar for our Meeting rooms, I have been playing around in Graph with different values, but I cannot find the same "id" for the meeting room calendar.

Closest I get is using this command: https://graph.microsoft.com/v1.0/users/c2c19414-c314-2d8f-be76f-9855727a209e/calendar

But I get error Not found 404 and a message: The specified object was not found in the store.

Any suggestions to how I can find the meeting room calendar ID?


Solution

  • I found the answer, and all I neeeded was to first find a value on the Room Mailbox Calendar that is named: "ExternalDirectoryObjectID". Then I took the value from this ID and used in the search string in MS Graph.

    I have written a short guide to how I did it her: https://www.blueclouds.no/post/how-to-find-the-right-id-for-a-room-mailbox-calendar