top of page
Tomas Bjerved

How to find the right ID for a Room Mailbox Calendar

Updated: Aug 13

I was given a task to help setting up an integration between a WordPress site and Exchange Online. In WordPress, the client wanted to show a Meeting Room Calendar. To link the Calendar you need an "ID" value. This value can be found by using Microsoft Graph.



After you log in with your licenced M365 account, that have an Exchange Mailbox, you can easily find the correct ID-value to use for the integration:

But we are not going to integrate with my personal Calendar, so how can we find the Meeting Room Calendar ID?


First we have to use a bit of PowerShell magic, we know the mail address of the meeting room, so we request information from EXO and we must filter the output. The value we are looking for is named "ExternalDirectoryObjectID".



Then we use the value of "ExternalDirectoryObjectId" when searching in MS Graph. We also have to change a part in the query from "../me/calendars/ to "../users/xxx-xxxx/calendars/"



And just like that we got the right kind of ID that we can use in our WordPress integration.


If you need to create a list of all the Room Mailbox ExternalDirectoryObjectId, you can create a CSV with one simple line in PowerShell:


Get-Mailbox -RecipientTypeDetails RoomMailbox | Select-Object DisplayName, ExternalDirectoryObjectId | export-csv "c:\temp\RoomMailbox_ExternalDirectoryObjectId_list.csv" -Encoding UTF8



587 views2 comments

2 Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
Guest
Apr 19

You can replace ExternalDirectoryObjectId with UserPrincipalName

Edited
Like

Guest
Mar 27
Rated 5 out of 5 stars.

This was perfect for what I needed thank you!


Like
bottom of page