calendar permissions to a security group

Anonymous
2024-06-07T13:35:19.8966667+00:00

We need to give our secreterial permissions to all employee calendars to add/change/delete the appointments.
With powershel we tried the following:

Get-mailbox | ForEach-Object { Set-MailboxFolderPermission -Identity $_":\Calendar" -User XXXX -AccessRights EditAllItems }

But that gave errors because the identity will be set to the "name" vallue instead of the emailaddress.

Can someone help us please?
Better yet it would be great to set these permissions company wide by default to a security group

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,178 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vasil Michev 119.6K Reputation points MVP Volunteer Moderator
    2024-06-07T15:22:35.7033333+00:00

    The proper way to do things would be to get both the mailbox and folder's ids, as "Calendar" is only valid for users with language preference set to English. So something like this:

    $calendars = Get-Mailbox -RecipientTypeDetails UserMailbox | Get-MailboxFolderStatistics -FolderScope Calendar | ? {$_.FolderType -eq "Calendar"} | select @{n="Identity"; e={$_.Identity.ToString().Replace("\",":\")}}
    
    $calendars | % {Add-MailboxFolderPermission -Identity $_.Identity -User XXXX -AccessRights Editor} 
    

    You can provide a (mail-enabled) security group for the User value. Also double-check the permissions you'd want added, as EditAllItems does not allow you to create new items.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.