Outlook for Windows Always Attempts to Connect to Office 365

In specific circumstances, when attempting to set up an account in Outlook, especially when attempting to connect via MAPI, you are prompted with an Office 365 login screen. In most cases you can simply close this window and you're prompted with standard account login credentials. However, that may not always work. 

This is because Microsoft's implementation of autodiscover in Outlook uses Office 365 as the priority location for a mailbox, irrespective of whether that mailbox is, or ever was, a part of an Office 365 implementation. This is where the "specific circumstances" come into play. 
  1. If you're using Office 365 for anything other than email. (E.g., just Office applications such as Word.)
  2. If you've used Office 365 in the past for your domain, but no longer use it. 
In both of these situations, it's very likely that Outlook will NOT move beyond looking at Office 365 when checking the autodiscover for your mailbox. This is because Microsoft caches lookup data for domains, and if a domain is, or was, on Office 365, that cache remains as the endpoint for an Outlook mailbox. If you've never used Office 365 for a domain, but you see the Office 365 login screen, simply canceling it (or clicking the X in the window to close it) will move on to a standard setup process. 

However, there IS a workaround for this so that you can easily set up an account in Outlook: 
  1. First, you'll want to remove the Profile from Outlook. If you're unsure how to do this, take a look at this KB article.
  2. Next, clear out ALL the data in C:\Users\[YOUR_USER\AppData\Local\Microsoft\Outlook.  (Make sure you're able to View - Hidden items in File Explorer or you won't be able to find the AppData folder for your user.)
  3. Next, flush local DNS by opening a command prompt and running: ipconfig /flushdns
Once this is done, you'll need to make a entry in your computer's Registry. Below is the change you will need to make. However, we know not everyone is comfortable making Registry changes. To alleviate that headache, you can download a zipped copy of a Registry (.reg) file and run it on any computer you need to. It will make the Registry change automatically. 
  1. Open Registry Editor (be sure you're running it as an Administrator) and navigate to
     HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\AutoDiscover
  2. Add a new "DWORD (32-bit) Value" and Name it:  PreferLocalXML
  3. Next, Edit the new Value and change it's "Value data" to 1:
  4. Once this has all been done, you can re-add your Account in Outlook.