A customer asked me if it was possible to have a room mailbox automatically accept meeting requests from external parties. They would also like to publish the calendar of that specific room publicly.
Let’s start with the first question. By default, resource mailboxes only accept requests from internal senders. As you might guess, you can’t change this behavior through the GUI, Powershell to the rescue!
Since I didn’t know the cmdlet that would let me change this behavior, the first thing I did was look for all “Calendar cmdlets”. After connecting to the Office 365 PowerShell, I ran this command
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
get-command *calendar*
CommandType Name Version Source
----------- ---- ------- ------
Function Get-CalendarDiagnosticAnalysis 1.0 tmp_xse1ew1u.eif
Function Get-CalendarDiagnosticLog 1.0 tmp_xse1ew1u.eif
Function Get-CalendarDiagnosticObjects 1.0 tmp_xse1ew1u.eif
Function Get-CalendarNotification 1.0 tmp_xse1ew1u.eif
Function Get-CalendarProcessing 1.0 tmp_xse1ew1u.eif
Function Get-MailboxCalendarConfiguration 1.0 tmp_xse1ew1u.eif
Function Get-MailboxCalendarFolder 1.0 tmp_xse1ew1u.eif
Function Set-CalendarNotification 1.0 tmp_xse1ew1u.eif
Function Set-CalendarProcessing 1.0 tmp_xse1ew1u.eif
Function Set-MailboxCalendarConfiguration 1.0 tmp_xse1ew1u.eif
Function Set-MailboxCalendarFolder 1.0 tmp_xse1ew1u.eif
Seems like there are a few cmdlets concerning calendars, good info for the second question! The Get-CalendarProcessing cmdlet looks promising, let’s try it out!
As you can see on the highlighted line, this is exactly the property we were looking for. Let’s change it so we get the desired behavior. In the get-command output, I saw a cmdlet Set-CalendarProcessing, this seems like the right one.
In the cmdlets we got earlier, there wasn’t really one that stood out as a “possible match” so let’s look at the attributes of the calendar itself. In essence, the calendar is just a folder inside of a mailbox object. Let’s query that folder directly.
That’s everything we need and more! As you can see, we can set the PublishEnabled attribute to true but we can do so much more. You can choose the detail level and even set how far back and forth the published calendar needs to go.
Let’s publish the calendar and run the Get-MailboxCalendarFolder cmdlet again to get the URL.