Is there a way to set the default calendar permissions for all new mailboxes?

Richard T 31 Reputation points
2022-06-10T00:14:33.973+00:00

How do we alter the "template" for all new mailbox users so that their calendar has a specified default permission? E.g. "editor" or "reviewer" as the default.

Exchange | Exchange Server | Management
Exchange | Exchange Server | Management
The administration and maintenance of Microsoft Exchange Server to ensure secure, reliable, and efficient email and collaboration services across an organization.
0 comments No comments
{count} votes

Answer accepted by question author
  1. KyleXu-MSFT 26,396 Reputation points
    2022-06-10T07:38:12.56+00:00

    @Richard T

    Do you want to modify the default calendar permission for newly created users?
    Are you using Exchange? on-premises?

    If so, you could use "Exchange Scripting Agent" to do it:

    Step 1: Close all EMS and EAC.

    Step 2: Find "ScriptingAgentConfig.xml.sample" file C:\Program Files\Microsoft\Exchange Server\V15\Bin\CmdletExtensionAgents

    Step 3: Replace the content with script below (You need to use admin permission to modify this file. Or you can copy it to desktop and copy it back after modifying). If there exist multiple Exchange servers, you need to modify all of them.

    <?xml version="1.0" encoding="utf-8" ?>   
        <Configuration version="1.0">   
        <Feature Name="NewMailbox" Cmdlets="New-Mailbox">   
        <ApiCall Name="OnComplete">   
        If ($succeeded) {  
            $Name = $provisioningHandler.UserSpecifiedParameters["Name"]  
            Set-MailboxFolderPermission -Identity $name":\Calendar" -User Default -AccessRights reviewer   
        }  
        </ApiCall>   
        </Feature>   
          
        <Feature Name="EnableMailbox" Cmdlets="Enable-Mailbox">  
        <ApiCall Name="OnComplete">  
        if ($succeeded) {          
            $user = Get-User -Identity $ProvisioningHandler.UserSpecifiedParameters["Identity"]  
            $mailbox = Get-Mailbox -Identity $user.DistinguishedName  
        Set-MailboxFolderPermission -Identity $mailbox":\Calendar" -User Default -AccessRights reviewer   
        }  
        </ApiCall>  
        </Feature>       
        </Configuration>  
    

    Step 4: Open EMS and run commands below:

    Disable-CmdletExtensionAgent "Scripting Agent"  
    Enable-CmdletExtensionAgent "Scripting Agent"  
    

    After that, when you create a new mailbox. The Scripting Agent will modify calendar for it automatic:
    210159-qa-kyle-15-06-58.png
    210110-qa-kyle-15-08-50.png


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Vasil Michev 124.9K Reputation points MVP Volunteer Moderator
    2022-06-10T07:28:19.17+00:00

    Unfortunately, there is no way to do that currently. You'll have to do it by running the Set-MailboxFolderPermission cmdlet manually, after a given mailbox is created. One approach is to add it as part of your "provision user/mailbox" script. Another is to periodically run the cmdlet against all mailboxes and update the settings. Populating a custom attribute can help you "filter out" mailboxes to which you've already set this, but as any user can reset their own Calendar permissions, you might want to check each mailbox just in case.

    1 person found this answer helpful.
    0 comments No comments

Your answer

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