Views:

 

Office 365 Calendar Permissions

Step 1

The first is step is to launch Windows PowerShell. We recommend running it as Administrator.

Step 2

Run the following command to login to 365 via Powershell and login with your Office 365 admin credentials:

$LiveCred = Get-Credential

Step 3

Now you need to create a new session:

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic –AllowRedirection

If at around this step you receive an error about missing or insufficient permissions, run the following command: Set-ExecutionPolicy RemoteSigned

Then reattempt the commands.

Step 4

Now you need to import the Office 365 session:

Import-PSSession $Session

Step 5

 

You can view current calendar permissions of the specified mailbox by using following:

Get-MailboxFolderPermission username:\calendar

As you can see by default on a calendar folder assigned only AvailabilityOnly role.

You can get the list off all user’s calendars default permissions using the following command:

Get-Mailbox –database mbxdbname| ForEach-Object {Get-MailboxFolderPermission $_”:\calendar”} | Where {$_.User -like “Default”} | Select Identity, User, AccessRights

Step 6

You can use these available access roles:

  • Owner — read, create, modify and delete all items and folders. Also this role allows manage items permissions;
  • PublishingEditor — read, create, modify and delete items/subfolders;
  • Editor — read, create, modify and delete items;
  • PublishingAuthor — read, create all items/subfolders. You can modify and delete only items you create;
  • Author — create and read items; edit and delete own items NonEditingAuthor – full read access and create items. You can delete only your own items;
  • Reviewer — read only;
  • Contributor — create items and folders;
  • AvailabilityOnly — read free/busy information from calendar;
  • LimitedDetails;
  • None — no permissions to access folder and files.

Step 7

Now run the following command. In the example below, user2 would be able to open user1 calendar and edit it:

Add-MailboxFolderPermission -Identity user1@domain.com:\calendar -user user2@domain.com -AccessRights Editor

If you need to change the Default permissions for the calendar folder (in order to allow all users view calendar of the specified user), run the command:

Set-MailboxFolderPermission -Identity user1@domain.com:\calendar -User Default -AccessRights Reviewer

In some cases, you need to grant Reviewer permissions on a calendar folder in all mailboxes to all users in your Exchange organization. You can make this bulk permission change using simple PowerShell script. To change Default calendar permission for all mailbox in mailbox database to Reviewer:

Get-Mailbox –database mbxdbname | ForEach-Object {Set-MailboxFolderPermission $_”:\calendar” -User Default -AccessRights Reviewer}

To remove permission use Remove-MailboxFolderPermission cmdlet:

Remove-MailboxFolderPermission -Identity user1@domain.com:\calendar –user user2@domain.com

Now you can disconnect from Office 365 your session:

Remove-PSSession $Session


Step 8

if you receive the following error message  "The Sharing policy doesn't allow you to grant certain permissions to users on CalendarFolder folder "Calendar"."

 

Then run the following try sharing by using the aliases of the users

Add-MailboxFolderPermission -Identity firstname.lastname -User firstname.lastname -AccessRights Author

This resulted in in the following error

“The Specified mailbox fristname.lastname isn’t unique”

This indicates that users need to have a unique alias to be able to share their calendar.
To change a user’s alias use the following command.

Set-Mailbox -identity firstname.lastname@domain.com -Alias firstname.lastname (Adding a unique qualifier to the end of the alias)

Once you have assigned a unique alias to the mailbox repeat step 7 to share the calendar with the desired user.

  

Guide steps taken from: https://theitbros.com/add-calendar-permissions-in-office-365-via-powershell/