Site icon Office 365 for IT Pros

Reporting Usage Patterns for Room Mailboxes

Room mailboxes activity.
Advertisements

Discovering if Room Mailboxes Are in Active Use

The May 21, 2026, EHLO blog post covers the topic of how to determine when resource mailboxes are in active use. Resource mailboxes cover room mailboxes and the resources associated with rooms, but I think that most of the attention is on room mailboxes because people have long asked about the usage patterns of conference rooms. I originally covered this subject in an article (and script) from 2022 explaining how to retrieve calendar events from room mailboxes to compute their usage. The original script uses Graph API requests. An updated version from 2024 uses the Microsoft Graph PowerShell SDK.

Use Exchange to Find Room Mailboxes

In any case, the EHLO post raised the question of how best to find the set of room mailboxes to process. Th e post concludes that the best way is to use Exchange Online PowerShell to find room mailboxes. Either the Get-Mailbox or the Get-ExoMailbox cmdlet will do:

[array]$Roommailboxes = Get-ExoMailbox -ResultSize Unlimited -RecipientTypeDetails RoomMailbox

This command returns an array of room mailboxes as known to Exchange Online. It’s the definitive set because Exchange Online must identify a mailbox as a room mailbox to use it as such.

The Graph Alternative

The alternative is to use the Get-MgPlaceAsRoom cmdlet from the Microsoft Graph PowerShell SDK (or the equivalent Graph API request). The command doesn’t return room mailboxes as such. Instead, it returns a list of place objects defined as rooms. Running Get-Mailbox and Get-MgPlaceAsRoom might return the same set of objects, but my bet is that in most tenants, they won’t.

The simple reason is that the Places API is pickier about what it considers to be a room than Exchange Online is. The Places API pulls information from Exchange Online to construct its list of rooms but won’t include a room mailbox if the mailbox properties lack information like city, country or region, and capacity. In my tenant, I have 18 room mailboxes, but the Places API only recognizes 13.

In any case, if you want to process room mailboxes to find out which mailboxes contain calendar events, it’s always best to use Exchange Online as your source of knowledge.

Avoiding Assembly Clashes

Using Exchange Online to fetch the set of room mailboxes means that scripts must load the Microsoft Graph PowerShell SDK and Exchange Online management module. Because of assembly clashes, you must run Connect-ExchangeOnline first and then Connect-MgGraph to load the modules into a session. The ongoing inability of Microsoft to ensure that all the PowerShell modules used with Microsoft 365 work together smoothly is tiresome. I wish they could solve the authentication module clashes once and for all.

Combining Exchange Online and the Microsoft Graph PowerShell SDK

Combining Exchange Online and the Microsoft Graph PowerShell SDK makes authorization slightly more complex. The Exchange Online module works on the basis that the signed-in user holds the Exchange administrator role, but you’ll need the Graph application Calendar.ReadBasic permission to use the Get-MgUserCalendarView  cmdlet to read basic details of events from all the room mailboxes (Figure 1). If you want full details of events, the app needs the Calendar.Read permission, but the lower-level permission is enough to know if a room mailbox is active (the scripts referenced above analyze the number of event attendees and other data and use the higher-level permission).

Figure 1: Application permissions to read calendar events from room mailboxes

You can run an interactive session that signs in with an Exchange administrator account and then authenticates in app-only mode to use SDK cmdlets. That’s enough for once-off checks and it’s what I did to use an example script that’s downloadable from GitHub. If you want to use a scheduled Azure Automation runbook to perform the checks on an ongoing periodic basis, the automation account must hold the Exchange administrator role.

It is a good idea to check the usage of room mailboxes and it’s relatively easy to do. Make sure you know what room mailboxes to access and have the correct permissions, and all will be well. Enjoy!


Insight like this doesn’t come easily. You’ve got to know the technology and understand how to look behind the scenes. Benefit from the knowledge and experience of the Office 365 for IT Pros team by subscribing to the best eBook covering Office 365 and the wider Microsoft 365 ecosystem.

Exit mobile version