SOLVED

Some On Premise mailboxes are provided with wrong external email address in Office 365

%3CLINGO-SUB%20id%3D%22lingo-sub-1429835%22%20slang%3D%22en-US%22%3ERe%3A%20Some%20On%20Premise%20mailboxes%20are%20provided%20with%20wrong%20external%20email%20address%20in%20Office%20365%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1429835%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F331904%22%20target%3D%22_blank%22%3E%40AtanasM%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%2C%20the%20users%20who%20are%20getting%20the%20.onmicrosoft%20addresses%20in%20O365%20are%20most%20likely%20setup%20in%20on-premises%20AD%20with%20a%20domain.local%20UPN%20suffix%20as%20opposed%20to%20the%20routable%20domain%20name.%20You%20will%20need%20to%20set%20their%20UPN's%20in%20AD%20to%20have%20a%20suffix%20of%20yourdomain.com%20as%20opposed%20to%20yourdomain.local.%20%26nbsp%3BThis%20should%20correct%20the%20issue%20for%20the%20affected%20users.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1429896%22%20slang%3D%22en-US%22%3ERe%3A%20Some%20On%20Premise%20mailboxes%20are%20provided%20with%20wrong%20external%20email%20address%20in%20Office%20365%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1429896%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F616707%22%20target%3D%22_blank%22%3E%40PeterRising%3C%2FA%3E%26nbsp%3Bcould%20you%20explain%20more%20precisely%20the%20phrase%3A%3C%2FP%3E%3CP%3E%22%3CSPAN%3Esetup%20in%20on-premises%20AD%20with%20a%20domain.local%20UPN%20suffix%20as%20opposed%20to%20the%20routable%20domain%20name%22.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThanks%20inn%20advance.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1429909%22%20slang%3D%22en-US%22%3ERe%3A%20Some%20On%20Premise%20mailboxes%20are%20provided%20with%20wrong%20external%20email%20address%20in%20Office%20365%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1429909%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F331904%22%20target%3D%22_blank%22%3E%40AtanasM%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20Active%20Directory%20Users%20and%20Computers%2C%20open%20one%20of%20the%20affected%20users%20and%20go%20to%20the%20Account%20tab.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20will%20see%20that%20the%20UPN%20is%20set%20to%20%3CA%20href%3D%22mailto%3Ausername%40domain.local%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Eusername%40domain.local%3C%2FA%3E.%20%26nbsp%3BUnder%20the%20domain%20suffix%20part%20of%20the%20UPN%2C%20click%20the%20dropdown%20and%20select%20the%20actual%20email%20domain%20and%20the%20UPN%20should%20change%20to%20%3CA%20href%3D%22mailto%3Ausername%40domain.com%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Eusername%40domain.com%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20don't%20see%20the%20domain%20in%20the%20dropdown%2C%20you%20may%20need%20to%20add%20it%20as%20an%20additional%20UPN%20suffix%20in%26nbsp%3BActive%20Directory%20Domains%20and%20Trusts.%20%26nbsp%3BHowever%2C%20as%20you%20have%20said%20that%20some%20of%20your%20users%20are%20syncing%20correctly%2C%20I%20am%20guessing%20the%20domain%20will%20be%20available%20to%20you%20in%20the%20dropdown.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1429929%22%20slang%3D%22en-US%22%3ERe%3A%20Some%20On%20Premise%20mailboxes%20are%20provided%20with%20wrong%20external%20email%20address%20in%20Office%20365%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1429929%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F616707%22%20target%3D%22_blank%22%3E%40PeterRising%3C%2FA%3E%26nbsp%3BI%20will%20chech%20this%20on%20Tuesday.%3C%2FP%3E%3CP%3EThanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1432901%22%20slang%3D%22en-US%22%3ERe%3A%20Some%20On%20Premise%20mailboxes%20are%20provided%20with%20wrong%20external%20email%20address%20in%20Office%20365%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1432901%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F616707%22%20target%3D%22_blank%22%3E%40PeterRising%3C%2FA%3E%26nbsp%3BI%20checked%20in%20Microsoft%20365%20admin%20center%20and%20Active%20Directory%20and%20the%20usernames%20are%20displayed%20correctly%20with%20the%20correct%20domain.%20The%20issue%20exists%20only%20in%20%22Contacts%22%20in%20Exchange%20Admin%20Center.%26nbsp%3BPlease%20check%20the%20attached%20screenshot.%3CBR%20%2F%3EWhat%20do%20you%20think%2C%20what%20could%20be%20the%20reason%20for%20that%20and%20how%20can%20I%20solve%20it%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1433788%22%20slang%3D%22en-US%22%3ERe%3A%20Some%20On%20Premise%20mailboxes%20are%20provided%20with%20wrong%20external%20email%20address%20in%20Office%20365%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1433788%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F331904%22%20target%3D%22_blank%22%3E%40AtanasM%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%2C%20so%20in%20your%20Exchange%20on-premises%20server%2C%20are%20the%20objects%20showing%20with%20the%20correct%20primary%20smtp%20email%20addresses%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1435606%22%20slang%3D%22en-US%22%3ERe%3A%20Some%20On%20Premise%20mailboxes%20are%20provided%20with%20wrong%20external%20email%20address%20in%20Office%20365%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1435606%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F616707%22%20target%3D%22_blank%22%3E%40PeterRising%3C%2FA%3E%26nbsp%3Bdo%20you%20mean%20in%20Active%20Directory%3F%3C%2FP%3E%3CP%3EPlease%20provide%20the%20path%20how%20to%20check%26nbsp%3B%20this.%3C%2FP%3E%3CP%3EThanks%20in%20advance.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1435806%22%20slang%3D%22en-US%22%3ERe%3A%20Some%20On%20Premise%20mailboxes%20are%20provided%20with%20wrong%20external%20email%20address%20in%20Office%20365%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1435806%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F331904%22%20target%3D%22_blank%22%3E%40AtanasM%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDo%20you%20not%20have%20an%20on%20premises%20Exchange%20Server%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1437718%22%20slang%3D%22en-US%22%3ERe%3A%20Some%20On%20Premise%20mailboxes%20are%20provided%20with%20wrong%20external%20email%20address%20in%20Office%20365%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1437718%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F616707%22%20target%3D%22_blank%22%3E%40PeterRising%3C%2FA%3E%26nbsp%3BThere%20are%202%20Exchange%20servers.%20Please%20check%20the%20screenshot.%3CBR%20%2F%3EThe%20main%20problem%20is%20that%2C%20some%20on%20prem%20mail%20users%20are%20shown%20with%20wrong%20%22external%20email%20address%22%20in%20%22Contacts%22%20in%20Exchange%20Admin%20Center.%20The%20wrong%20email%20address%20is%20the%20secondary%20email%20address%20which%20ends%20with%20%40domain.mail.onmicrosoft.com.%3CBR%20%2F%3EWhen%20trying%20to%20edit%20manually%20the%20external%20email%20address%2C%20it%20comes%20the%20following%20error%20message%3A%3CBR%20%2F%3E%22The%20operation%20on%20mailbox%20failed%20because%20it's%20out%20of%20the%20current%20user's%20write%20scope.%3CBR%20%2F%3EThe%20action%20%E2%80%98Set-MailUser%E2%80%99%2C%20%E2%80%98ExternalEmailAddress%E2%80%99%2C%20can%E2%80%99t%20be%20performed%20on%20the%20object%20because%20the%20object%20is%20being%20synchronized%20from%20your%20on-premises%20organization%22.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1429749%22%20slang%3D%22en-US%22%3ESome%20On%20Premise%20mailboxes%20are%20provided%20with%20wrong%20external%20email%20address%20in%20Office%20365%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1429749%22%20slang%3D%22en-US%22%3E%3CP%3EIn%20some%20OnPremise%20mailboxes%2C%20the%20associated%20%E2%80%9Cmail%20users%E2%80%9D%20in%20O365%20are%20provided%20with%20the%20wrong%20external%20email%20address.%3C%2FP%3E%3CP%3EThe%20target%20address%20for%20mail%20users%20is%20set%20wrong%20by%20Azure%20AD%20Connect.%3C%2FP%3E%3CP%3EOur%20customer%20has%20a%20hybrid%20exchange%20configuration%2C%20set%20up%20with%20AzureAD%20Connect%20and%20the%20Hybrid%20Configruation%20Wizard%20(HCW).%3CBR%20%2F%3EAll%20users%20with%20Onpremise-mailboxes%20are%20replicated%20from%20AD%20Connect%20as%20mail%20users%20to%20O365.%20Some%20mail%20users%20have%20the%20right%20external%20email-adresse%20set%20as%20...%40ourdomain.com%20(correct)%20and%20some%20mail%20users%20have%20the%20external%20email%20address%20set%20to%20...%40mytenant.mail.onmicrosoft.com%20(wrong).%3CBR%20%2F%3ETarget%20email%20address%20for%20on%20Premise%20mailboxes%20isn't%20set.%3CBR%20%2F%3EWhy%20does%20Azure%20AD%20Connect%20set%20the%20wrong%20target%20address%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1429749%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20AD%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EIdentity%20Management%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1687963%22%20slang%3D%22en-US%22%3ERe%3A%20Some%20On%20Premise%20mailboxes%20are%20provided%20with%20wrong%20external%20email%20address%20in%20Office%20365%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1687963%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F331904%22%20target%3D%22_blank%22%3E%40AtanasM%3C%2FA%3E%26nbsp%3BI'm%20with%20the%20Sam%20issue%20%2C%20did%20you%20get%20the%20solution%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1688675%22%20slang%3D%22en-US%22%3ERe%3A%20Some%20On%20Premise%20mailboxes%20are%20provided%20with%20wrong%20external%20email%20address%20in%20Office%20365%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1688675%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F800026%22%20target%3D%22_blank%22%3E%40Jjsilva%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F331904%22%20target%3D%22_blank%22%3E%40AtanasM%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EApologies%2C%20I%20lost%20track%20of%20this%20issue.%26nbsp%3B%20The%20reason%20that%20the%20email%20address%20could%20not%20be%20changed%20is%20the%20Source%20of%20authority%20is%20on-premises%20AD%2C%20not%20Azure%20AD.%26nbsp%3B%20To%20change%20this%20email%20address%20you%20would%20need%20to%20do%20so%20from%20the%20on-premises%20Exchange%20Admin%20Centre%2C%20not%20the%20Exchange%20Online%20one.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1714753%22%20slang%3D%22en-US%22%3ERe%3A%20Some%20On%20Premise%20mailboxes%20are%20provided%20with%20wrong%20external%20email%20address%20in%20Office%20365%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1714753%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F616707%22%20target%3D%22_blank%22%3E%40PeterRising%3C%2FA%3E%26nbsp%3BHello%20the%20problem%20is%20when%20the%20on-premise%20user%20is%20sync%20to%20cloud%20it%20gets%20the%20wrong%20external%20smtp%20address%20although%20the%20upn%20of%20the%20user%20is%20correct%20with%20the%20%3CA%20href%3D%22mailto%3Aexample%40doamin%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Eexample%40doamin.com%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Frequent Contributor

In some OnPremise mailboxes, the associated “mail users” in O365 are provided with the wrong external email address.

The target address for mail users is set wrong by Azure AD Connect.

Our customer has a hybrid exchange configuration, set up with AzureAD Connect and the Hybrid Configruation Wizard (HCW).
All users with Onpremise-mailboxes are replicated from AD Connect as mail users to O365. Some mail users have the right external email-adresse set as ...@ourdomain.com (correct) and some mail users have the external email address set to ...@mytenant.mail.onmicrosoft.com (wrong).
Target email address for on Premise mailboxes isn't set.
Why does Azure AD Connect set the wrong target address?

12 Replies

@AtanasM 

 

Hi, the users who are getting the .onmicrosoft addresses in O365 are most likely setup in on-premises AD with a domain.local UPN suffix as opposed to the routable domain name. You will need to set their UPN's in AD to have a suffix of yourdomain.com as opposed to yourdomain.local.  This should correct the issue for the affected users.

@PeterRising could you explain more precisely the phrase:

"setup in on-premises AD with a domain.local UPN suffix as opposed to the routable domain name".

 

Thanks inn advance.

@AtanasM 

 

In Active Directory Users and Computers, open one of the affected users and go to the Account tab.

 

You will see that the UPN is set to username@domain.local.  Under the domain suffix part of the UPN, click the dropdown and select the actual email domain and the UPN should change to username@domain.com 

 

If you don't see the domain in the dropdown, you may need to add it as an additional UPN suffix in Active Directory Domains and Trusts.  However, as you have said that some of your users are syncing correctly, I am guessing the domain will be available to you in the dropdown.

@PeterRising I checked in Microsoft 365 admin center and Active Directory and the usernames are displayed correctly with the correct domain. The issue exists only in "Contacts" in Exchange Admin Center. Please check the attached screenshot.
What do you think, what could be the reason for that and how can I solve it?

@AtanasM 

 

Hi, so in your Exchange on-premises server, are the objects showing with the correct primary smtp email addresses?

Hi @PeterRising do you mean in Active Directory?

Please provide the path how to check  this.

Thanks in advance.

@AtanasM 

 

Do you not have an on premises Exchange Server?

@PeterRising There are 2 Exchange servers. Please check the screenshot.
The main problem is that, some on prem mail users are shown with wrong "external email address" in "Contacts" in Exchange Admin Center. The wrong email address is the secondary email address which ends with @domain.mail.onmicrosoft.com.
When trying to edit manually the external email address, it comes the following error message:
"The operation on mailbox failed because it's out of the current user's write scope.
The action ‘Set-MailUser’, ‘ExternalEmailAddress’, can’t be performed on the object because the object is being synchronized from your on-premises organization".

@AtanasM I'm with the Sam issue , did you get the solution ?

 

best response confirmed by AtanasM (Frequent Contributor)
Solution

@Jjsilva @AtanasM 

 

Apologies, I lost track of this issue.  The reason that the email address could not be changed is the Source of authority is on-premises AD, not Azure AD.  To change this email address you would need to do so from the on-premises Exchange Admin Centre, not the Exchange Online one.

@PeterRising Hello the problem is when the on-premise user is sync to cloud it gets the wrong external smtp address although the upn of the user is correct with the example@doamin.com