Editing regedit is really bad idea i have found. How about DNS? SSL for autodiscover and fqdn domain name for 2. you need public IP for domain name in question for fqdn.com and SSL autodiscover "A" record for autodiscover.fqdn.com with SSL. fqdn.com should have "A" record of public IP. fqdn should have SSL binded as well in IIS, DNS, exchange ECP.
Outlook connecting to Office365 instead of on-premise Exchange server
Hi
We have an on-premise Exchange server. The users are running Office 365 and up to a few days ago, Outlook was working fine and the users were connecting to their local Exchange mailboxes.
Now they are disconnected from their mailboxes and are getting a prompt to enter an account to reconnect to it. However, their domain account never gets accepted.
In the past if we created a new Outlook profile it would automatically find the Exchange mailbox and connect. However, now they get the prompt to enter the account to use autodiscover.xml.
Before this occurred, we did not change anything on the Exchange server or in the local Windows DNS Manager.
We have tried a number of troubleshooting steps but none have been successful.
We have even added to the registry path "HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\AutoDiscover" the DWORD (32-bit)Value with the name ExcludeExplicitO365EndPoint and gave it the value 1.
What could be causing this behaviour?
Regards,
Exchange | Exchange Server | Management
-
Aholic Liang-MSFT • 13,886 Reputation points • Microsoft External Staff
2022-08-16T06:29:45.927+00:00 Hi @GIC-AUA ,
I want to know if you create a new profile with only one on-premises mailbox, will this issue persist?
If yes, please use ExRCA to check if it can connect to Exchange server successfully.If Autodiscover is working and pointing to the correct server, You should be able to stop Outlook from checking Office 365 settings by setting both registry keys.
HKEY_CURRENT_USER\SOFTWARE\Microsoft\office\16.0\outlook\autodiscover DWORD: ExcludeExplicitO365Endpoint Value = 1 HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\office\16.0\outlook\autodiscover DWORD: ExcludeExplicitO365Endpoint Value = 1
Please restart the Outlook2016 client after you modify the registry and recreate the profile to see if it can works.
-
GIC-AUA • 51 Reputation points
2022-08-19T13:48:04.127+00:00 Hello Aholic Liang-MSFT
Thanks for your assistance.
All mailboxes are on-premises and we are not able to create new profiles because it seems as if there i a problem with the autodiscover.
I tried the ExRCA and it does not connect to the Exchange server using autodicover.
I tried setting both registry keys and it made no difference.
Regards,
-
Aholic Liang-MSFT • 13,886 Reputation points • Microsoft External Staff
2022-08-22T09:06:26.083+00:00 Hi,
I tried the ExRCA and it does not connect to the Exchange server using autodicover.
If possible, please provide a complete screenshot about it for our better research. (In order to avoid the disclosure of your privacy, please remember to hide your personal information).
-
GIC-AUA • 51 Reputation points
2022-08-22T19:33:24.98+00:00 Hi AholicLiang-MSFT
When I run the Microsoft Remote Connectivity Analyzer, I enter the information as follows:
The results are as follows:
I notice in the results, the host is returned as domain.com but I think it should be <mail_server_computer_name>.domain_name.local.
On the internal network Outlook Web App works with domain.local but not domain.com and we need to specify the computer name of the mail server.
I hope the information provided sheds some light on what could be causing the problem.
Regards,
-
Aholic Liang-MSFT • 13,886 Reputation points • Microsoft External Staff
2022-08-23T08:43:58.367+00:00 Hi @GIC-AUA ,
Thanks for your detailed information.
Do you have any websites running with the root domain(domain.com)?
If so , the website will take over the request of search for the Autodiscover URL.
Please following steps below to add the value ExcludeHttpsRootDomain will force Outlook to skip domain.com and go direct to Autodiscover.domain.com, and then see if it works:1.open regedit.exe on the client computer and locate
HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\AutoDiscover
2.add a DWORD value named ExcludeHttpsRootDomain and set its value data to 1
3.restart Outlook and check if you are able to configure the profile
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. -
GIC-AUA • 51 Reputation points
2022-08-23T12:18:48.377+00:00 Hi AholicLiang-MSFT
Yes. There is an external website hosted with domain.com.
On the client computer, I added the DWORD ExcludeHttpsRootDomain and set its value to 1.
When I try to create the Outlook profile, I get the following pop-up:
In the server field it has the external domain and in the username it the the email address.
I restarted the client computer just to see if it was necessary after changing the registry, but it made no difference.
Regards,
-
Aholic Liang-MSFT • 13,886 Reputation points • Microsoft External Staff
2022-08-24T08:56:54.853+00:00 Hi,
Please have a check that the Autodiscover CNAME record is set up in DNS to point to the mail.contoso.com.
Autodiscover service in Exchange Server | Microsoft Learn
According to Autodiscover process , add the value ExcludeHttpsRootDomain will force Outlook to skip domain.com and go direct to Autodiscover.domain.com .However , you won't receive any useful information from “autodiscover.domain.com/autodiscover/autodiscover.xml” if you do not set Autodiscover record in DNS.
-
GIC-AUA • 51 Reputation points
2022-08-24T12:57:36.907+00:00 Hi AholicLiang-MSFT
I reviewed the link to the document you sent Autodiscover service in Exchange Server | Microsoft Learn (https://learn.microsoft.com/en-us/Exchange/architecture/client-access/autodiscover?view=exchserver-2019#autodiscover-in-dns).
It is a bit confusing because there is a section that states the following:
*
> Autodiscover is simple to set up for your domain because it only requires that you create a CNAME resource record in your external (public) DNS. CNAME records let you hide the implementation details of your network from the clients that connect to it. Used internally in your network, CNAME records allow users to use the simpler URI mail.domain.com instead of host.examplemachinename.domain.com.
*
It asks us to create a CNAME record in our external (public) DNS but the problem we have is that the Outlook has connectivity issues with the local Exchange server so why would it need to contact the external DNS and not the local DNS.
In our local DNS we have an A record for the Exchange server as follows:
We have a CNAME record as follows:
I'm really confused as to why I need to worry abut the public DNS. The local domain is domain.local. When the A and CNAME records were created, it automatically used domain.local and not the domain.com external domain.
Regards,
-
Aholic Liang-MSFT • 13,886 Reputation points • Microsoft External Staff
2022-08-26T09:24:18.69+00:00 Hi,
I think the main reason for the issue is that your email address doesn't correspond to the FQDN of Autodiscover.
Please change the FQDN of Autodiscover like Autodiscover.domain.com to see if it changes. -
Aholic Liang-MSFT • 13,886 Reputation points • Microsoft External Staff
2022-08-30T08:38:46.2+00:00 Hi @GIC-AUA ,
It has been a few days and I am checking in to see how things are going on with this issue.
Does this issue have any updates? -
GIC-AUA • 51 Reputation points
2022-08-31T01:50:24.357+00:00 Hi AholicLiang-MSFT
I'm not able to change the FQDN of autodiscover because it is greyed out. I'm only able to change the FQDN for the target host, It can be changed to <computer_name_of_exchange_server>.domain.com but iy makes no difference.
Regards,
-
Aholic Liang-MSFT • 13,886 Reputation points • Microsoft External Staff
2022-09-02T09:46:06.91+00:00 Hi,
I am sorry to come back late. Could you please re-confirm the following questions:- Are the users with issue connected to the Exchange server from internal or external?
- Whether the computers they are using are domain-joined?
- Please refer to the following link to use Test-Email AutoConfiguration feature of Outlook and post a screenshot of the results that under the "Log" tag .
https://answers.microsoft.com/en-us/msoffice/forum/all/mailboxes-test-e-mail-autoconfiguration/19f9c90a-4640-46c4-a574-dbec29bdb8ba
(Notes: Please only select “Use Autodiscover” , and don’t forget to hide your personal information! )
-
Aholic Liang-MSFT • 13,886 Reputation points • Microsoft External Staff
2022-09-07T02:58:54.497+00:00 Hi,
Just checking in to follow up with this thread. If you have any questions or need further help on this issue, please feel free to post back. -
GIC-AUA • 51 Reputation points
2022-09-15T20:34:58.28+00:00 Part 1 of 2
Hi
I'm still having issues and now it is much worse.
- I cannot create an Outlook profile for new users to access their Exchange mailbox in the internal network. At the
moment they can only use OWA to connect to the on-premises Exchange server. - Existing uses keep getting a pop-up to authenticate on the Exchange server and if they enter the credentials the message disappears and then re-appear seconds later As you can see in the image below, Outlook states "Connected to: Microsoft Exchange".
- I cannot create an Outlook profile for new users to access their Exchange mailbox in the internal network. At the
-
GIC-AUA • 51 Reputation points
2022-09-15T20:36:45.71+00:00 Part 2 of 2
- The issue I have is for only for users on the LAN with the on-premises Exchange server.
- We tried the the "Test-Email AutoConfiguration" tool in Outlook and got the results below:
The on-premises exchange server is xxx-v-svr-02.domain.local but in the tool it shows xxx-v-svr-02.domain.com.
On the last line it has https://domain.com/autodiscover/autodiscover.xml Succeeded. However when we ping domain.com it is pointing to the external mail server.The setup has always been as follows: On-premises Exchange forwards emails though a Smart Host on the external hosting company (domain.com). A utility on the Exchange server uses POP3 to retrieve the emails from the mailboxes on the external email server at the hosting company and forwards them to the corresponding Exchange mailboxes. This worked fine for years but something change recently.
Somehow the autodiscover on the local network is ignoring the on-premises Exchange server and going out to the External hosting company.
Regards,
-
GIC-AUA • 51 Reputation points
2022-09-23T18:02:21.503+00:00 Hi
I'm still having issues. Did you see my last post?
Regards,
-
Stuart Elliott • 141 Reputation points
2022-11-14T11:25:39.57+00:00 Did you ever solve this, I get this from time to time, also with a .local domain (although I do have a mydomain.co.uk entry in the local DNS server for the internal ip-address to try to stop it going out into the big bad world.
I am just starting the process of migrating to Office365 in the cloud, and I fear all the hacks and slashing I've done over the last 15 years or so to registries and AD policies are going to make for a real bad time though :(
-
Phil Wize • 5 Reputation points
2023-10-18T14:21:17.56+00:00 Are there any news related to the problem?
I have the exact same setup and therefore the same problem. -
Jonathan Obenauer • 0 Reputation points
2023-10-20T16:59:27.7433333+00:00 I also started having this exact issue on 10/18/2023
-
Howard Hood • 15 Reputation points
2023-10-24T20:31:32.0933333+00:00 Same issue here. OUTLOOK365 is a nightmare.
MS seems to have BAKED in ther own servers, and to hell with the rest of the world.
Outlook 2013 we were able to enter all the neccessary details about our hosted exchange (NOT MICROSOFT SERVERS) and it worked flawlessly.
Now with this new flavour, it's a joke. Outlook INSISTS on connecting to thier own servers. Even if we do get it to work, it sticks for less than 24 hours, the then somwhow, "AUTOMATICALLY" it switchs back over to 0ffice365.microsoft.com GARBAGE.
We don't use MS Servers, never have, never will. Get over it and fix this issue.
HUGE WASTE OF TIME WITH THIS PRODUCT.
-
David Gawler • 25 Reputation points
2024-01-20T04:35:46.05+00:00 all the suggestions here are wrong to fix the problem. you should not have to edit a clients computer registery on every single machine to login to exchange server to on premise, that would be ridiculous on a large scale setup with exchange. It is an autodiscover error with DNS error to go with, I have had the same issue with my exchange server for months, i can login perfectly by Microsoft Exchange Active Sync - that works fine on all my clients with exchange server but not connecting via the Microsoft Exchange method, it always defaults to office 365, that is wrong. It needs to connect to your own domain setup with on premise exchange server. I assume it is DNS, Autodiscover and port 443. I have tried a number of fixes but how to just connect to on premise exchange server domain without the need to custom microsoft exchange server active sync connection. Ps. my mobile logging in perfectly fine on my iphone 14 pro max to exchange server, it is only relevant to exchange server problem and windows desktop client client in outlook client where DNS and autodiscover is not working correctly, how to fix this, please?
-
Deleted
This comment has been deleted due to a violation of our Code of Conduct. The comment was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
-
David Gawler • 25 Reputation points
2024-01-22T01:37:20.63+00:00 Exchange is a rhino on heat. I get a problem where i can connect only on my local LAN IP connectivity. soon as i switch my IP to my public IP address of my router it does not connect and tries to connect to office 365 online, clearly it is a DNS issue of some sought, mail flow, autodiscover works fine on my mobile and iphone even mac clients. when it comes to windows 10, 11, it just does not connect from a public IP and tries to connect to microsoft 365 online exchange, it needs to default to microsoft exchange on premise, regardless of LAN or WAN IP address. Any ideas?
-
David Gawler • 25 Reputation points
2024-01-22T01:45:42.21+00:00 Exchange is a rhino on heat. I get a problem where i can connect only on my local LAN IP connectivity. soon as i switch my IP to my public IP address of my router it does not connect and tries to connect to office 365 online, clearly it is a DNS issue of some sought, mail flow, autodiscover works fine on my mobile and iphone even mac clients. when it comes to windows 10, 11, it just does not connect from a public IP and tries to connect to microsoft 365 online exchange, it needs to default to microsoft exchange on premise, regardless of LAN or WAN IP address. Any ideas?
My exchange works perfect on my mobiles, apple, samsung, OWA, macs, etc, except when i connect from a public IP anywhere then microsoft exchange does not work but i can connect using Microsoft Exchange Active Sync Client for outlook and that goes to my microsoft exchange on premise server. How to make exchange connect from anyIP with out being on the same LAN? 192.168.50.40 my windows desktop client public IP from ISP when on laptop, it fails to connect to exchange on premise and tries to connect to microsoft 365 online, i do not want this. when i switch back to my local IP LAN IP then exchange connects to my on premise server and functions normally. I guess this is fine for people in the office on the same LAN but when they are remote on their laptops then they should be able to connect just the same as if theyre on any IP across the world 4g wifi or any connection. Any one know how to fix this? Clearly it is a DNS issue with windows 2022 Server, Exchange 2019 DNS lookup addresses? As mentioned, i can connect to exchange great on the same IP. soon as i'm on another IP thats public IP on 4g then exchange bails and refuses to connect, i can connect to Microsoft Exchange ActiveSync and OWA, that works fine anywhere but why exchange client on windows dont work on any device away from the office, e.g. on 4g connection?
-
Caspar - ABO 276 Reputation points
2024-09-16T09:38:15.54+00:00 We have had the same issue with many clients. If you run a modern version of Outlook you will run into a strange issue that seems to be hard coded in the software: If you have your own onpremise Exchange server (mail.company.com) , the moment you add your own domain (company.com) to a 365 tenant, Outlook automatically assumes that you also host your email at 365 servers. When you start Outlook or setup a new profile it will first check the 365 servers for the presence of your own domain. It will not get to the point where it needs to check your own correct autodiscover. It it finds your domain there at 365 it will try logging on there first, hence the 365 logon box. It will not accept your credentials. The only way we are able to fix that is to add the registry fix to tell Outlook to skip the 365 check at startup so it moves on to autodiscover. I have not found any other way so far.
-
Tranquil Computing Solutions • 0 Reputation points
2025-06-27T11:01:56.2566667+00:00 Strongly Agree with this. At least here in the UK Microsoft 365 Exchange is horrendously slow, full of bugs, causes Outlook to crash completely if internet connection is spotty or lost entirely and causes nothing but issues for our client base. (Upwards of 2000 clients) PLEASE Stop forcing Office Outlook users to use your extremely poor platform. Make Outlook work properly with both On-Prem and IMAP and get rid of new outlook entirely. Also, there needs to be an option in MS365 to completely disable Exchange so that your servers aren't looked at over Autodiscover or SRV records (This really is just stupid!) We shouldn't be forced to enter Registry hacks in order to not use MS365. This is not good enough Microsoft.
Sign in to comment
2 answers
Sort by: Most helpful
-
David Gawler • 25 Reputation points
2024-02-27T09:12:32.15+00:00 -
Pasquale Consalvo • 5 Reputation points
2024-08-11T14:18:03.4166667+00:00 Microsoft has uninstalled the option to connect Outlook Desktop software to on premise Exchange Servers. There is no option to try to connect to Exchange Servers on premise.It's unavailable.