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

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 (160 points)
0 votes
1 answer

By default when you upload a user photo to Adaxes, it converts it to less than 100kb for Active Directory, that photo is synced to Azure AD, and once and only ... older script that could grab the photo before the compression to 100kb, ideally after cropping?

asked Jun 16, 2020 by ethanthekiwi (30 points)
0 votes
0 answers

When attempting to assign licenses during the "after creating a user" rule we're reciving the following error. Failed to create a remote mailbox for the user. The address ' ... mail attribute to the proper format that isn't the onmicrosoft.com domain as well.

asked Sep 2, 2021 by zorps (20 points)
3,326 questions
3,026 answers
7,727 comments
544,678 users