0 votes

I need to edit the default calendar permissions to reviewer for all company. We are using office2016 so the policy on M365 to do this doesn't seem to work.

Instead we run a script that does it but I was wondering if it is possible after user creation to do it.

The user would need to have a mailbox set up in Exchange Online first in order for the permissions to be set. Is it possible to have a script wait until a mailbox is established in Exchange Online and once its up and running then set the permissions on the calendar?

Im aware that this would slow down user creation somewhat

by (350 points)

1 Answer

0 votes
by (270k points)

Hello,

There is no need to use scripts or make the action wait for the mailbox to be created. You can use the Modify Exchange properties action right after the one assigning the Microsoft 365 license with access to Exchange Online. Adaxes will automatically wait until the mailbox is created and then perform necessary changes. The actions sequence will look like the following: image.png For details on automating Exchange tasks, have a look at the following tutorial: https://www.adaxes.com/tutorials_AutomatingDailyTasks_AutomateExchangeMailboxConfiguration.htm.

0

Thats all good apart from the fact the the inbuilt Adaxes Modify Exchange Properties do no allow for the modification of the 'Default' calendar user (which isn't a user at all but a default setting however it appears in the calendar as a user.

I am trying to edit that

0

Hello,

Sorry for the confusion, but we are not sure what exactly you mean by 'Default' calendar user? Could you, please, provide the script you are currently using to configure the desired settings? Any additional details will be much appreciated.

0
try
{
    # Get the object ID in Microsoft 365
    $objectId = [Guid]$Context.TargetObject.Get("adm-O365ObjectId")
}
catch
{
    return # The user doesn't have a Microsoft 365 account
}

try
{
    # Connect to Exchange Online
    $session = $Context.CloudServices.CreateExchangeOnlinePSSession()
    Import-PSSession $session -AllowClobber -DisableNameChecking -CommandName "Set-MailboxFolderPermission","Get-MailboxFolderStatistics" 

    # Get calendar folder name
    $calendarFolderName = (Get-MailboxFolderStatistics "%mail%" | where-object {$_.FolderType -eq "Calendar"}).Name

    try {
        # Set Mailbox Permissions
        Set-MailboxFolderPermission -Identity "%mail%:\$calendarFolderName" -User Default -AccessRights Reviewer -ErrorAction Stop
    }
    catch {
        $context.LogMessage("Could not set Calendar permissions for %username%'s mailbox. Error: " + $_.Exception.Message, "Error")
          return
    }
}    
finally
{
    # Close the remote session and release resources
    if ($session) { Remove-PSSession $session }
}
0

Hello,

The Modify Exchange properties action does allow modifying permissions for the 'Default' calendar user. You need to select This Organization as trustee and Full details as permission level. image.png Finally, the actions sequence will look like the following: image.png

0

Ahhh excellent thank you!

Related questions

0 votes
1 answer

Hi Everyone I want to create a custom command where I can select multiple users and then select a mailbox and give them full access to the mailbox. Is there a way to do it? Thank you for help

asked Nov 2, 2021 by Sandberg94 (340 points)
0 votes
1 answer

I am trying to trigger processing outside of Active Directory when an account is created based on the source user account that was used. Does Adaxes store the source account anywhere?

asked Oct 9, 2023 by jnordell (20 points)
0 votes
1 answer

Hello, you helped us with a script to set the oof-message. Now we want to know, if it's possible to activate/deactivate the mail-forwarding option time-based. In the ... deactivate it accordingly on "param-abw-ende" Can you help me with that? Thanks Carsten

asked Nov 17, 2022 by lohnag (140 points)
0 votes
1 answer

Automation of user creation based on ServiceNow ticket creation.

asked Jan 24, 2022 by tdetmer (20 points)
0 votes
1 answer

Hi Is there a possiblity within the Copy User function to automaticly select the same OU as the selected user is in? So that the user that is being created, ends up in the same ou as the user it was copied from? Thanks

asked Jan 27, 2021 by Sandberg94 (340 points)
3,326 questions
3,025 answers
7,727 comments
544,678 users