Outlook for Windows Always Attempts to Connect to Microsoft 365 (Office)

In specific circumstances, when attempting to set up an account in Outlook, especially when attempting to connect via MAPI, you are prompted with an Microsoft 365 (Office) 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 Microsoft 365 (Office) for anything other than email. (E.g., just Office applications such as Word.)
  2. If you've used Microsoft 365 (Office) 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 Microsoft 365 (Office) when checking the autodiscover for your mailbox. This is because Microsoft caches lookup data for domains, and if a domain is, or was, on Microsoft 365 (Office), that cache remains as the endpoint for an Outlook mailbox. If you've never used Microsoft 365 (Office) for a domain, but you see the Microsoft 365 (Office) 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.) NOTE: If you have multiple Outlook profiles, you can keep the existing OST files. If you created a profile for the account that is pointing to Office 365, simply delete that OST along with any other hidden files.  
  3. Next, flush local DNS by opening a command prompt and running: ipconfig /flushdns
    • NOTE: This might require that you open Command Prompt in Administrator mode. 
Once this is done, you'll need to make two entries 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. NOTE: This shortcut will only work on computers running Outlook version 16.0. For older versions, the entries must be made manually. In addition, it does not contain any Registry entries for any specific locales. Therefore, it may require edits based on your region. (E.g., adding entries for .de or .cn locales.)

  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. NOTE: If you are using an older version of Outlook, you must change the path to match the associated version. (16.0 = Outlook 2016, 15.0 = Outlook 2013, 14.0 = Outlook 2010, 12.0 = Outlook 2007).
  2. Add a new "DWORD (32-bit) Value" and name it:  PreferLocalXML
  3. Next, Modify the new Value and change its "Value data" to 1:
  4. Add a new 'DWORD (32-bit) Value" and name it: ExcludeExplicitO365Endpoint
  5. Modify the new Value and changes its "Value data" to 1:
  6. After making registry edits, it's a good idea to reboot your machine. However, this step may be optional. 
  7. Once each step has been completed, you can re-add your Account in Outlook.


Hi all!

In the article above there's a precompiled .REG file to download, but it has more entries than those described in the article itself.

Can you please explain those entries?

And possibly update the article properly so that everything is explained correctly?

Gabriele Maoret - SERSIS (8/21/2023 at 7:54 AM)
Hi, Gabriele.

That original registry file included some locale-specific URLs for Outlook and Office365, as well as some internal domains we use for testing purposes.

As this article is actually relatively old, we've updated the registry file to remove the local domains, as well as the locale-specific domains for Office as those can change based on a user's location.

Derek Curtis (8/21/2023 at 9:09 AM)