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@example.org' and 'smtp:%email@example.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 "firstname.lastname@example.org" 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?