0 votes


I have created a business rule to create Office 365 Mailboxes and set certain properties:

adm-customattributeBoolean1 has a friendly name of "create Exchange Online mailbox?"
adm-customattributetext13 has a friendly name of "assign office 365 license version:"

If the admin says yes create a mailbox, and assign x license (in this case K1) than I want to add the user to an AD security group, Activate the user license (K1), then modify the user email addresses and disable some features such as EAS, IMAP, and POP3.

If the operation succeeded AND
the 'adm-CustomAttributeBoolean1' property equals 'True' AND
the 'adm-CustomAttributeText13' property equals 'Office 365 K1' then
Add the User to the 'O365_ExchangeOnlineEnabled (Domain.com\Users\Groups)' group
Activate an Office 365 account for the User: set Location to 'US', enable Office 365 Enterprise K1
Modify mailbox settings for the User: modify E-Mail Addresses (add 'SMTP:%firstname%.%lastname%@company.com' and 'smtp:%username%@company1com.mail.onmicrosoft.com'), disable Exchange ActiveSync, disable POP3, disable IMAP4
Execute custom command 'Set Office365 License Status (Office 365)' for the User

This works, except for the SMTP addresses. Here is what happens:

1. the account is created
2. the license is assigned in Office 365, creating a "cloud" user.
3. the smtp addresses are assigned correctly. (I can verify this in the EAC)

Now we wait for ADFS replication, when that occurs:
1. the user changes from "cloud" to "synced from active directory" as expected.
2. the SMTP addresses are removed, and the default "logonname@domain.com" address is created.

It seems that when Office365 links the new on premise AD account to the Cloud account created by Adaxes, it wipes out the SMTP values created by my rule.

How to I get around this?

by (710 points)


1 Answer

0 votes
by (216k points)
selected by
Best answer


First of all, if you are running in an Exchange Hybrid environment, it is recommended that you enable remote mailboxes for users synced with your Active Directory. For information on how to add an action to enable a remote mailbox to your Business Rule that provisions new users, see 365 Hybrid New User Creation.

Also, make sure that in the settings of the action that modifies the e-mail addresses, you disable address update based on e-mail address policies. For this purpose, you need to enable the 1st checkbox for the Automatically update e-mail addresses based on e-mail address policy option, and leave the 2nd checkbox cleared.

Related questions

0 votes
1 answer

Hi all I need to modify the template $remoteRoutingAddressTemplate with the default exchange option automatically update email addresses disable. How i make it?

asked Nov 28, 2022 by Simone.Vailati (430 points)
0 votes
1 answer

I'm trying to modify mailbox settings to add additional email addresses to a user after creation. This is a hybrid on-prem and Exchange Online with E5 licenses. Everything works up ... to a different OU during the process so I know the user exists. Any ideas?

asked Mar 6, 2023 by Michael Long (70 points)
0 votes
1 answer

We have been able to add email addresses using the script in E-Mail Addresses Is there a way to reverse the process and specify the smtp address you want to remove using a similar subset of code.

asked Dec 14, 2022 by martin.mcclorey (40 points)
+1 vote
1 answer

Since today were receiving the below error when attempting to add additional email addresses to users via Adaxes. An Azure Active Directory call was made to keep object in sync ... How do we fix to get the ability to add email addresses via Adaxes again?

asked Mar 1, 2021 by techg (320 points)
0 votes
1 answer

Hello, I've set it up using this tutorial https://www.adaxes.com/tutorials_Simpli ... Office.htm It almost works perfectly on user creation, however the street portion never ... it shows that it does. Postal code, state/province, and city set as expected.

asked Jun 4, 2018 by yuvrajgill10 (100 points)
3,293 questions
2,991 answers
544,208 users