When you need to set permissions for calendars in bulk, this should help you.
The Basics
Don’t forget to connect to Exchange Online Powershell first:
PowerShell
Connect-ExchangeOnline
Then, you can use one of the following depending on what you want to do.
PowerShell
# Give John Smith access to Jim Bob's calendar with the PublishingEditor role
Add-mailboxfolderpermission -identity "jim.bob@example.com:\Calendar" -User "john.smith" -accessrights PublishingEditor
# Modify the existing permission to be a different role
Add-mailboxfolderpermission -identity "jim.bob@example.com:\Calendar" -User "john.smith" -accessrights Editor
# Modify the default permission (used for any user that doesn't have a permission set for the calendar). Useful when you want everyone to be able to see a calendar.
Set-mailboxfolderpermission -identity "jim.bob@example.com:\Calendar" -User Default -accessrights PublishingEditor
Modify All User’s Calendar Permissions
PowerShell
foreach($mailbox in Get-Mailbox -RecipientTypeDetails UserMailbox) {
$calendar = $mailbox.alias+”:\Calendar”
Set-MailboxFolderPermission -Identity $calendar -User Default -AccessRights LimitedDetails
}
What permissions can be used?
You can either set individual permissions, or use a preset role. Roles are easier but may not do exactly what you want.
The following individual permissions are available:
- None: The user has no access to view or interact with the folder or its contents.
- CreateItems: The user can create items within the specified folder.
- CreateSubfolders: The user can create subfolders in the specified folder.
- DeleteAllItems: The user can delete all items in the specified folder.
- DeleteOwnedItems: The user can only delete items that they created from the specified folder.
- EditAllItems: The user can edit all items in the specified folder.
- EditOwnedItems: The user can only edit items that they created in the specified folder.
- FolderContact: The user is the contact for the specified public folder.
- FolderOwner: The user is the owner of the specified folder. The user can view the folder, move the folder and create subfolders. The user can’t read items, edit items, delete items or create items.
- FolderVisible: The user can view the specified folder, but can’t read or edit items within the specified public folder.
- ReadItems: The user can read items within the specified folder.
The roles that are available, along with the permissions that they assign, are described in the following list:
- Author: CreateItems, DeleteOwnedItems, EditOwnedItems, FolderVisible, ReadItems
- Contributor: CreateItems, FolderVisible
- Editor: CreateItems, DeleteAllItems, DeleteOwnedItems, EditAllItems, EditOwnedItems, FolderVisible, ReadItems
- NonEditingAuthor: CreateItems, DeleteOwnedItems, FolderVisible, ReadItems
- Owner: CreateItems, CreateSubfolders, DeleteAllItems, DeleteOwnedItems, EditAllItems, EditOwnedItems, FolderContact, FolderOwner, FolderVisible, ReadItems
- PublishingAuthor: CreateItems, CreateSubfolders, DeleteOwnedItems, EditOwnedItems, FolderVisible, ReadItems
- PublishingEditor: CreateItems, CreateSubfolders, DeleteAllItems, DeleteOwnedItems, EditAllItems, EditOwnedItems, FolderVisible, ReadItems
- Reviewer: FolderVisible, ReadItems
The following roles apply specifically to calendar folders:
- AvailabilityOnly: View only availability data
- LimitedDetails: View availability data with subject and location
Leave a Reply