Hi everyone
I’ve got an issue with changing the primary email of a user from within a Local AD of from 365 admin portal.
We have a hybrid setup here. So we created user in the Local ad, and it syncs to 365.
In the local AD, i checked the user AD users and computers, on the general tab, the email is set correct as user@company.com, in the proxyadress of the user it’s set as follows:
SMTP: user@company.com
smtp: user@company.onmicrosoft.com
I’ve pushed the local ad to sync to 365 and it shows the update happened. But when I look at the user properies in Azure / Exchange this change is NOT changing.
Here the user still shows as the primary email as being user@company.onmicrosoft.com(SMTP) and user@company.com(smtp)
If I try to change it, it constantly fails with some message saying an Azure AD dicision was made to keep the local on prem and 365 users in sync.
Then I came across another SpiceWorks article: Office 365 Dirsync - Primary SMTP Changed
I followed the steps here. But at the last stage I get the attached error.
The reason for trying to change, is if we send an email to this user from outside the network to their normal user@company.com email it fails. but when you send to the user@company.onmicrosoft.com then it goes through fine. This will most definitely cause issues.
Any advise would be appreciated.
Thanks in advance,
@joshbarringer3595
6 Spice ups
nhnm
(nhnm)
2
How long has it been since you made the change? Sometimes the changes don’t show up immediately in 365.
1 Spice up
It’s now been about 4 hours since I made the change.
Just sent a test mail now to see if maybe somehow it’s working, immediately came back with the error message attached.
Eventhough the in the bounce back email it tells me the email I sent to doesn’t exist, the email address is in the proxyadress of the local AD user and shows as the smtp:user@company.com in 365 admin portal.
But ye, can’t change it to the main email.
Also, if I look at the properties of the user within 365 admin portal. the correct account user@company.com shows as the username and UPN of the user, but we unable to set that as the primary email for the user.
Thanks
@joshbarringer3595
1 Spice up
davecork
(davecork)
4
I had this happen a couple of times early on. Make sure there’s no space between the colon and the first character of email address. EX
SMTP:Username(at)domain.com is correct
SMTP: Username(at)domain.com is incorrect because there is a space between the colon and the “U.”
2 Spice ups
matthart5
(CrazyLefty)
5
Is this a new hybrid setup? Sounds like email to @domain.com goes to your local exchange and onmicrosoft.com goes correctly to O365. Could this be the case?
If not, check the dirsync logs and see if it has any errors applying the changes.
In local exchange, is the user account set as a local mailbox or a remote mailbox? The user will need to be marked as a remote mailbox.
Use enable-remotemailbox to set that for the user
Add a character to the name of the user, such as “John” becomes “Johna”. Replicate through the domain.
Initiate Incrementation Sync, twice. Open Azure AD Connect UI and confirm NAME property updated with the new value.
Did the SMTP address change?
1 Spice up
joz
(Joz_)
7
According to my research, Set-MsolUserPrincipalName cmdlet changes the User Principal Name, or user ID, of a user, the command is not suitable for you to change the primary address. For more details: Set-MsolUserPrincipalName
Could you change the primary address in on-prem exchange EAC?
@matthart5 yes this is indeed a hybrid setup. But there is no onprem exchange. only the local ad is setup, which syncs to 365. and the mailboxes are only on 365.
@davecork yes I actually check, re-checked, and re-checked myself on that. it’s definitely the correct format.
@lucid-flyer I changed the users name as you suggested, synced on local ad, but nothing changed from what I could see.
@joz I’ve also tried that multiple times. but it constantly fails.
joz
(Joz_)
9
According to error messages, your issue is more related with AAD, and I have found a similar thread for your reference and you could refer to the solution which is provided in this thread.
THanks for everybodies inputs here. We managed to get this resolved, but basically had to resort to creating these users from scratch.
We deleted the accounts which was showing in the AAD / 365, then once everything synced nicely, we restored the initial accounts which got deleted. made a backup of there data and again deleted all of this.
After again waiting for everything to sync, we setup the users from scratch, imported all their data and all was good.
Not the best solution, but it worked for what we needed.
1 Spice up