PowerCUT #3 – Exchange returns organisers for event subjects for resources

2nd January 2023

Recently I was working on a project where I needed to use Power Automate and the Graph API to return events in a resource/room’s calendar to display in a canvas app. This all went pretty smoothly except for one part… returning the ‘subject’ of my events/meetings. This just kept returning the organiser! In this PowerCUT, I’m going to explain what was causing this and how we can change the behaviour of our resource in exchange to stop this from happening.

The Cause…

So the reason behind exchange returning the organiser in the subject field, was because that was in fact the value in the subject for the event. No… it wasn’t the subject I initially inputted when creating my meeting in Outlook, but it is the one that was overwritten in a background process by Exchange.

By default for resources, Exchange will remove the subject we’ve given a meeting and it will place the organiser there instead so that when people view the room calendar they see the meeting. The result is our own calendar still showing the subject we initially put against the meeting, but the resource calendar renaming the event.

Making changes in Exchange…

So to change the behaviour of exchange when we create a meeting for a room we need to change two configuration parameters using Exchange Online PowerShell.

First make sure you’ve got the Exchange Online PowerShell module installed – PowerShell Gallery | ExchangeOnlineManagement 3.0.0

Then we can get to work connecting to and using the Exchange Online PowerShell module to make the necessary changes.

You can follow the guidance here to connect to the Exchange Online shell – Connect-ExchangeOnline (ExchangePowerShell) | Microsoft Learn

One you’re connected use the following command to keep the subject of a scheduled meeting the same as a user inputs when scheduling it in Outlook.

Set-CalendarProcessing -Identity <RESOURCEMAILBOX> -DeleteSubject $False -AddOrganizerToSubject $False

I hope this PowerCUT post helped you understand why you might not be seeing the expected subject being returned when calling the Graph API to get calendar events for rooms/resources in Exchange Online and helped you to change the behaviour of a resource to apply what you might expect Exchange Online to do!

If you have any questions drop them in the comments below.

Posted in Uncategorized

Leave a Reply

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

This will close in 0 seconds