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 (287k 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

Hi all, I have a condition during new user creation - Where the corporate email is entered into the email address field, but a custom drop-down for "Mailbox required?" is No. ... screen, and be able to save the result of this choice to a variable? Thanks all,

asked 6 days ago by dshortall (80 points)
0 votes
1 answer

As we use the dateformat dd.mm.yyyy I set it as required in this format in the regesp. Is it possible to convert the CustomAttributeText5 from "dd.mm.yyyy" in "yyyy ... [datetime]::ParseExact($entryDatePropertyName, "dd.MM.yyyy", $null).ToString("yyyy-MM-dd")

asked Jun 11 by fabian.p (380 points)
0 votes
1 answer

For creating a computer object, we want to check if the entered CN is already used in our AD. And for that we want to use a powershell script. An other dot ... powershell script should be start before creating the computer object, right? Thanks for your help.

asked Jun 4 by KEME (80 points)
0 votes
1 answer

I'd like to add a field for "Ticket Number" to pass through so that I can have it run a script post execution to log data to our ticketing system. I ... it may be possible to extend the public class ResetPasswordOptions but that's not really ideal...

asked May 27 by ZoomGhost (280 points)
3,526 questions
3,217 answers
8,197 comments
547,625 users