Archives April 2017

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.

Accept meetings from external parties

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

PowerShell

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

get-command*calendar*

CommandType Name Version Source

----------------------------

FunctionGet-CalendarDiagnosticAnalysis1.0tmp_xse1ew1u.eif

FunctionGet-CalendarDiagnosticLog1.0tmp_xse1ew1u.eif

FunctionGet-CalendarDiagnosticObjects1.0tmp_xse1ew1u.eif

FunctionGet-CalendarNotification1.0tmp_xse1ew1u.eif

FunctionGet-CalendarProcessing1.0tmp_xse1ew1u.eif

FunctionGet-MailboxCalendarConfiguration1.0tmp_xse1ew1u.eif

FunctionGet-MailboxCalendarFolder1.0tmp_xse1ew1u.eif

FunctionSet-CalendarNotification1.0tmp_xse1ew1u.eif

FunctionSet-CalendarProcessing1.0tmp_xse1ew1u.eif

FunctionSet-MailboxCalendarConfiguration1.0tmp_xse1ew1u.eif

FunctionSet-MailboxCalendarFolder1.0tmp_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!

PowerShell

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

get-mailbox"test room"|Get-CalendarProcessing|fl

RunspaceId:9f1b6e5d-09a6-40d9-9b83-8006a50d4284

AutomateProcessing:AutoUpdate

AllowConflicts:False

BookingWindowInDays:180

MaximumDurationInMinutes:1440

AllowRecurringMeetings:True

EnforceSchedulingHorizon:True

ScheduleOnlyDuringWorkHours:False

ConflictPercentageAllowed:0

MaximumConflictInstances:0

ForwardRequestsToDelegates:True

DeleteAttachments:True

DeleteComments:True

RemovePrivateProperty:True

DeleteSubject:True

AddOrganizerToSubject:True

DeleteNonCalendarItems:True

TentativePendingApproval:True

EnableResponseDetails:True

OrganizerInfo:True

ResourceDelegates:{}

RequestOutOfPolicy:{}

AllRequestOutOfPolicy:False

BookInPolicy:{}

AllBookInPolicy:True

RequestInPolicy:{}

AllRequestInPolicy:False

AddAdditionalResponse:False

AdditionalResponse:

RemoveOldMeetingMessages:True

AddNewRequestsTentatively:True

ProcessExternalMeetingMessages:False

RemoveForwardedMeetingNotifications:False

MailboxOwnerId:test room

Identity:test room

IsValid:True

ObjectState:Changed

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.

This change will only affect new meeting requests, requests that have already been refused won’t be automatically accepted.

Publish calendar publicly

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.

PowerShell

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

Get-MailboxCalendarFoldertestroom@domain.com:\calendar|fl

RunspaceId:

Identity:test room:\calendar

PublishEnabled:False

PublishDateRangeFrom:ThreeMonths

PublishDateRangeTo:ThreeMonths

DetailLevel:AvailabilityOnly

SearchableUrlEnabled:False

PublishedCalendarUrl:

PublishedICalUrl:

CalendarSharingOwnerSmtpAddress:

CalendarSharingPermissionLevel:Null

SharingLevelOfDetails:None

SharingPermissionFlags:None

SharingOwnerRemoteFolderId:AAA=

IsValid:True

ObjectState:Changed

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.