The MailboxFolderPermission cmdlet for Exchange Online is getting improved with the adding of a new parameter (SharingPermissionFlags) to let you manage calendar delegation.

With this parameter, which only applies to Calendar folder when using the Editor access right, you can set the user as a delegate (as you do when using the Delegate Access from Outlook client).

Below 2 commands using this new parameter:

  • Set the delegate to view private items in the calendar

Add-MailboxFolderPermission –Identity <delegates mailbox>:\Calendar –User <delegated mailbox> -AccessRights Editor -SharingPermissionFlags Delegate,CanViewPrivateItems

  • Set the delegate to not view private items in the calendar

Add-MailboxFolderPermission -Identity <delegates mailbox>:\Calendar -User <delegated mailbox> -AccessRights Editor -SharingPermissionFlags Delegate