It's best to use Conditional Access based MFA when you have Azure AD Premium P1…
Manage calendar permissions in Office 365 with PowerShell
How to manage calendar permissions in Office 365 with PowerShell? If you have the correct PowerShell commands, you can manage calendar permissions much more efficiently. You can get, add, edit and remove calendar permissions. In this article, we will look at all the possibilities.
Table of contents
Information
There are different options to manage calendar permissions in Office 365 and on-premises Exchange Server. Let’s have a look at the options:
- One way is to add yourself (admin) full access permissions to the mailbox you want to configure. Open the calendar in Outlook and edit the calendar permissions for the user. This will work, but it takes time.
- Another way is to ask the user to change the permissions. Sometimes they do it wrong, and you have to double-check with them if everything went OK.
A great way for most is to manage Office 365 calendar permissions in Office 365 Exchange admin center. Unfortunately, that’s not possible because Microsoft didn’t add such a feature in Office 365 or Exchange Server.
What do I recommend? PowerShell. It’s excellent to get, add, edit, and remove permissions with PowerShell. The user doesn’t have to do anything, and you are sure it works.
Calendar roles and permissions
The roles that are available, along with the permissions that they assign, are described in the following list:
Roles | Permissions |
---|---|
Owner | CreateItems, CreateSubfolders, DeleteAllItems, DeleteOwnedItems, EditAllItems, EditOwnedItems, FolderContact, FolderOwner, FolderVisible, ReadItems |
PublishingEditor | CreateItems, CreateSubfolders, DeleteAllItems, DeleteOwnedItems, EditAllItems, EditOwnedItems, FolderVisible, ReadItems |
Editor | CreateItems, DeleteAllItems, DeleteOwnedItems, EditAllItems, EditOwnedItems, FolderVisible, ReadItems |
PublishingAuthor | CreateItems, CreateSubfolders, DeleteOwnedItems, EditOwnedItems, FolderVisible, ReadItems |
Author | CreateItems, DeleteOwnedItems, EditOwnedItems, FolderVisible, ReadItems |
NonEditingAuthor | CreateItems, FolderVisible, ReadItems |
Reviewer | FolderVisible, ReadItems |
Contributor | CreateItems, FolderVisible |
LimitedDetails | View availability data with subject and location (Free/Busy time, subject, location) |
AvailabilityOnly | View only availability data (Free/Busy time) |
None | No permissions to access folder and files |
Below is a screen how the Calendar Properties look in Outlook.
Connect to Exchange Online PowerShell
The below steps will work for both Office 365 and Exchange on-premises organizations. The only difference is that you have to:
- Connect with Exchange Online PowerShell for Exchange Online
- Connect with Exchange Management Shell for Exchange on-premises
In this example, we will make a connection with Exchange Online PowerShell. Run Windows PowerShell as administrator and connect to Exchange Online PowerShell v2.
PS C:\> Connect-ExchangeOnline -UserPrincipalName admin@exoip.com
Now that we are connected, let’s start.
Get default calendar name
Good to know is that the default calendar might be in a different language.
The best way to find out the default calendar name is to use the Get-MailboxFolderStatistics cmdlet. Use the -FolderScope parameter to filter calendar folders only.
PS C:\> Get-Mailbox -Identity "Emma Stryker" | Get-MailboxFolderStatistics -FolderScope Calendar | ft Identity,Name
Identity Name
-------- ----
Emma Stryker\Calendar Calendar
For example, in The Netherlands, they speak Dutch. The default name calendar is Agenda. The below output is how it looks if it’s a Dutch mailbox calendar.
PS C:\> Get-Mailbox -Identity "Emma Stryker" | Get-MailboxFolderStatistics -FolderScope Calendar | ft Identity,Name
Identity Name
-------- ----
Emma Stryker\Agenda Agenda
Now that we have the default calendar name, we can proceed further.
Get calendar permissions
View the access right on John’s calendar. Use Get-MailboxFolderPermission cmdlet.
By default, Office 365 users can’t view messages or calendar items of other users. The only permission provided to all users by default is the ability to view free/busy information in the calendar of other users (AvailabilityOnly role).
PS C:\> Get-MailboxFolderPermission -Identity "Emma Stryker:\Calendar" | ft Identity,FolderName,User,AccessRights
Identity FolderName User AccessRights
-------- ---------- ---- ------------
Emma Stryker:\Calendar Calendar Default {AvailabilityOnly}
Emma Stryker:\Calendar Calendar Anonymous {None}
Add calendar permissions
Add the user John with reviewer access rights to Emma’s calendar. Make use of the Add-MailboxFolderPermission cmdlet.
PS C:\> Add-MailboxFolderPermission -Identity "Emma Stryker:\Calendar" -User "John Walker" -AccessRights Reviewer
RunspaceId : 0c0d2c7c-3aca-4c6c-8215-b52a2fdbc5b9
Identity : Emma Stryker:\Calendar
FolderName : Calendar
User : John Walker
AccessRights : {Reviewer}
SharingPermissionFlags :
IsValid : True
ObjectState : New
Do you have a distribution group or security group that you want to add? Add the group with access rights permissions.
PS C:\> Add-MailboxFolderPermission -Identity "Emma Stryker:\Calendar" -User "Calendar Group" -AccessRights Reviewer
Set calendar permissions
If you want to edit the calendar permission access rights, you want to use Set-MailboxFolderPermission. Change John’s access rights to Owner.
PS C:\> Set-MailboxFolderPermission -Identity "Emma Stryker:\Calendar" -User "John Walker" -AccessRights Owner
Read more: Set default calendar permissions for all users with PowerShell »
Remove calendar permissions
As of last, let’s use Remove-MailboxFolderPermission cmdlet to delete John’s access.
PS C:\> Remove-MailboxFolderPermission -Identity "Emma Stryker:\Calendar" -User "John Walker" -Confirm:$false
That’s it!
Keep reading: Export mailbox permissions with PowerShell »
Conclusion
In this article, you learned how to manage calendar permissions in Office 365 with PowerShell. Make sure you connect to Exchange Online PowerShell first. After that, run the commands that you need. This can be checking, adding, editing, or removing calendar permissions.
Remember to use the:
- Get-MailboxFolderPermission cmdlet to view existing calendar permissions
- Add-MailboxFolderPermission cmdlet to add new calendar permissions
- Set-MailboxFolderPermission cmdlet to modify calendar permissions
- Remove-MailboxFolderPermission cmdlet to remove existing calendar permissions
Did you enjoy this article? You may also like Show week number in Outlook calendar. Don’t forget to follow us and share this article.
This Post Has 0 Comments