How to find User Access in Resource Room Calendars using PowerShell

How to find User Access in Resource Room Calendars using PowerShell

Introduction

Managing resource room calendars in Microsoft 365 can be challenging, especially when you need to track who has access or booking rights. In this blog, we’ll walk through two powerful PowerShell scripts that help you identify:
1. All room mailboxes where a specific user has calendar permissions.
2. All room mailboxes where a specific user has booking delegate rights.

Whether you’re an IT admin managing large environments or just need visibility into calendar access, these scripts will simplify your workflow.

Script 1: Get All Resource Rooms Where User Has Calendar Access

This script helps you find all the room mailboxes where a user has been granted permissions to the calendar folder.
Here’s the full script:

Get-Mailbox -RecipientTypeDetails RoomMailbox -ResultSize Unlimited | ForEach-Object {Get-MailboxFolderPermission "$($_.Alias):\Calendar"} | Where {$_.User -like "*lastname*"} | Select Identity, User, AccessRights | Export-Csv -NoTypeInformation "C:\Users\Desktop\Information.csv"

Let’s break down this script step-by-step:

  • **Get-Mailbox -RecipientTypeDetails RoomMailbox -ResultSize Unlimited**: Retrieves all room mailboxes in your tenant.
  • **ForEach-Object {Get-MailboxFolderPermission “$($_.Alias):\Calendar”}**: Loops through each mailbox and checks calendar permissions.
  • **Where {$_.User -like “*lastname*”}**: Filters results to only include entries where the user matches the provided last name.
  • **Select Identity, User, AccessRights**: Selects specific fields to export—who has access, what access, and to which calendar.
  • **Export-Csv -NoTypeInformation “C:\Users\Desktop\Information.csv”**: Exports the final result to a CSV file on your desktop.

✅ **Expected Output Example:**

You’ll get a CSV file showing entries like:

Identity: Room101\Calendar
User: firstname.lastname@domain.com
AccessRights: {Editor}

Script 2: Get All Resource Rooms Where User Has Booking Delegate Permissions

Booking delegates are users who can accept or decline meeting requests for a room. This script helps you find all room mailboxes where a specific user is listed as a delegate.

Get-Mailbox -RecipientTypeDetails RoomMailbox -ResultSize Unlimited | ForEach-Object {Get-CalendarProcessing -Identity "$($_.Alias)"} | Where {$_.ResourceDelegates -like "*lastname*"} | Select Identity | Export-Csv -NoTypeInformation "C:\Users\Desktop\Information.csv"

Here’s what each part does:

  • **Get-Mailbox -RecipientTypeDetails RoomMailbox -ResultSize Unlimited**: Fetches all room mailboxes.
  • **ForEach-Object {Get-CalendarProcessing -Identity “$($_.Alias)”}**: Retrieves calendar processing settings for each mailbox.
  • **Where {$_.ResourceDelegates -like “*lastname*”}**: Filters only mailboxes where the user is listed as a delegate.
  • **Select Identity**: Shows the room mailbox identity where this user has delegate rights.
  • **Export-Csv -NoTypeInformation “C:\Users\Desktop\Information.csv”**: Saves the result to your desktop.

✅ **Expected Output Example:**

Your CSV will contain:
Identity: Room102

Explanation of Script Outputs

The output of both scripts is saved in CSV format, making it easy to open in Excel or any other spreadsheet tool. You’ll be able to filter, sort, and analyze calendar access or delegate assignments with ease.

Conclusion

With these two scripts, you can instantly gain visibility into calendar permissions and delegate setups across all resource rooms. It simplifies management and ensures compliance with your organizational policies.

Don’t forget to run these scripts in an Exchange Online PowerShell session with the necessary admin permissions.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *