SOLVED

SMTP-addresses not in sync with AD

Copper Contributor

We have an AADSync enabled tenant syncing the users to Office 365 and have ADFS running. We have NO Exchange hybrid setup. Mailboxes are on-premises Exchange.

I accidently created for some users a Mailbox and deleted it again. With this, the primary SMTP-address changed from the right mailadress, which was synced from AD, to the tenants xxx.onmicrosoft.com

 

I just want to change it back to the primary SMTP-address of the on-premises Mailbox which worked well until i created the mailboxes.

I tried to temporary change the primary SMTP on-premises and change it back. But the first change worked, the change back not. Some ideas? Is it possible to change the SMTP-addresses in O365 or is it possible to "force" a sync from AD?

 

Thanks!

9 Replies
set-mailuser -Identity abc -EmailAddresses @{Add="abc@abc.de"} did not work: The operation on mailbox "abc" failed because it's out of the current user's write scope. The action 'Set-MailUser', 'EmailAddresses', can't be performed on the object
abc' because the object is being synchronized from your on-premises organization. This action should be performed on the object in your on-premises organization. But if I Change on-premises it doesn't work

How did you remove the online mailbox? Please refer to the following:

https://technet.microsoft.com/en-us/library/jj863440(v=exchg.160).aspx

Then you can add SMTP:user@domain.com in ProxyAddresses property of local AD. Note that it can take some time to appear in the online user (more tan a sync cycle)

 

I just disabled the Licence of "Exchange Online". In local AD the property is set correct, so adding is not possible. I also tried to remove the adress in local Exchange, sync and add it again. Didn't work.

By disabling the license you are not removing the mailbox

https://blogs.technet.microsoft.com/exchange/2016/10/31/change-in-behavior-for-delicensed-exchange-o...

Please refer to the article I posted in order to permanently delete EXO mailbox

best response confirmed by Jonathan Klein-Wiele (Copper Contributor)
Solution

You should be able to use the -WindowsEmailAddress parameter for this. The new address you specify should be set as the Primary SMTP, while the old primary one will be kept as secondary. The cmdlet will also work against synced users.

 

If that's not a viable solution for your scenario, you can force-delete the mailbox in O365 and provision the object anew. Use the method outlined here for fastest resolution: https://blogs.technet.microsoft.com/exchange/2018/01/17/permanently-clear-previous-mailbox-info/

How about the Set-MsolUserPrincipalName command?

Thanks for your feedback, I tried all your hints but none worked... But we will move in the next weeks to hybrid and I hope problems are gone then.

if you don't comnpletely remove the EXO created mailboxes, Hybrid/Migration won't work for those

Ok, thanks guys, seems that the reply from Vasil worked. It needed some time but now I got the mails and could fix the issue!

 

Thanks also for all the other hints!

1 best response

Accepted Solutions
best response confirmed by Jonathan Klein-Wiele (Copper Contributor)
Solution

You should be able to use the -WindowsEmailAddress parameter for this. The new address you specify should be set as the Primary SMTP, while the old primary one will be kept as secondary. The cmdlet will also work against synced users.

 

If that's not a viable solution for your scenario, you can force-delete the mailbox in O365 and provision the object anew. Use the method outlined here for fastest resolution: https://blogs.technet.microsoft.com/exchange/2018/01/17/permanently-clear-previous-mailbox-info/

View solution in original post