0 votes

Hi All,

I have an OU ADSynced to Office 365

When I create Shared Mailboxes I basically create the user account sync it to 365 Assign it a license and and set the CustomAttributeBoolean1 to true.

I then have a scheduled task that checks for the CustomAttributeBoolean1 and then runs the scheduled task with the below actions.

image.png

What I find is the task itself does work providing the mailbox has already been created. In otherwords if it runs whilst the mailbox is creating it will fail on the convert which is expected.

The below shows that the convert operation fails, however it still continues on with the rest of the actions. I know there must be somethign cunning to fix this, but I just cant seem to figure it out. I was thinking that there may be a way to only process the below actions if the previous one returned an Operation status of "Completed"

image.png

by (20 points)
0

Hello Casey,

How exactly do you create shared mailboxes? Could you, please, provide us with all the possible details regarding the workflow you have configured? Screenshots of Business Rules and scripts taking part in the workflow will be very helpful. Please, post them here or send to us (support[at]adaxes.com).

Also, please, specify the version of Adaxes you are currently using. For information on how to check it, have a look at the following help article: https://www.adaxes.com/help/HowDoI.ManageService.CheckAdaxesServiceVersion.html.

0

I create the mailbox using the below. Rule.

image.png

This all works just fine. Of course 365 takes some time to create the mailbox once the license is assigned.

If I left it longer to run the convert to shared mailbox schedulded task it all works as expected.

0

Hello Casey,

Thank you for the provided details. Please, post here or send us (support[at]adaxes.com) both the Set UPN Suffix by Company and the ADSync scripts.

0

Many thanks sending them now.

1 Answer

0 votes
by (284k points)

Hello Casey,

Thank you for the provided details. The issue occurs because the If has Exchange mailbox condition does not check the actual mailbox existence in such cases. To achieve the desired, use the following script in the If PowerShell script returns true condition in your Scheduled Task:

$Context.ConditionIsMet = $True

try
{
    $mailParameters = $Context.TargetObject.GetMailParameters()
}
catch
{
    $Context.ConditionIsMet = $False
}

Also, if you have a hybrid Exchange environment with Exchange 2019 and Adaxes version 2019.2 or later, you can use method EnableRemoteMailboxEx2 to create shared remote mailboxes. In this case, you will not need to assign and then revoke Microsoft 365 licenses.

Related questions

0 votes
1 answer

Good afternoon, Is there a script for adding a user to an already existing Office 365 Shared Mailbox? I want to add this script onto the onboarding rules I have added already.

asked May 7 by ocanizales (60 points)
0 votes
1 answer

Is there a way to add Microsoft Defender for Office 365 Plan 2 licenses from Adaxes? Currently it is not showing in the list of available licenses to modify. The endpoint ... the E3 license is showing up no problem, just not the standalone one for O365.

asked Aug 20 by Alex23 (50 points)
0 votes
1 answer

Is there a way to use the built-in "Modify Exchange Properties" action to add a mailbox delegate that only resides in the cloud? We can do it via a powershell script, but I ... action. For example, I want to add "Company Administrator" to a user via the GUI:

asked Sep 14, 2015 by yourpp (540 points)
0 votes
1 answer

The built in functionality to convert exchange online mailboxes to shared does not work for users that are synced from our local AD via Azure AD connect. How can we over ... account to in cloud from synced with AD all our issues with this would be resolved.

asked Jul 31, 2019 by john.morrow (270 points)
0 votes
1 answer

I'd like some help with a script to revoke a users rights to a shared mailbox upon being removed from a security group. I already have the reverse, a script that adds users to a shared mailbox, if they are a member of a group, now I just need the reverse.

asked Mar 20 by dominik.stawny (280 points)
3,499 questions
3,191 answers
8,141 comments
547,340 users