---
title: "Exchange - Outlook sign-in prompts to Office 365"
description: "Diagnose and fix the recurring Outlook sign-in prompts pointing to Office 365 when your mailbox is actually hosted on Exchange OVHcloud"
url: https://docs.ovhcloud.com/en/guides/web-cloud/email-and-collaborative-solutions/microsoft-exchange/outlook-connecting-to-office-365
lang: en
lastUpdated: 2026-06-24
---
# Exchange - Outlook sign-in prompts to Office 365

## Objective

Outlook may repeatedly display a Microsoft 365 sign-in window asking for your credentials, sometimes accompanied by the message "Tell us the account you want to use to open autodiscover.xml". This window can reappear even after restarting Outlook or creating a new profile. Yet the affected mailbox is not hosted in the Microsoft cloud: it is located on an Exchange OVHcloud solution (Hosted Exchange or dedicated Exchange).

This behaviour is caused by an Outlook feature called "Direct Connect to Office 365", which forces the client to query the Office 365 autodiscover and bypasses the one on your Exchange OVHcloud server.

**This guide explains how to identify the cause of these repeated connection prompts and prevent Outlook from connecting to Office 365.**

## Requirements

- Have an [Exchange OVHcloud solution](https://www.ovhcloud.com/en-gb/emails/hosted-exchange/) already set up.
- Have the [classic Outlook](https://support.microsoft.com/en-gb/Outlook/install-or-reinstall-classic-outlook-on-a-windows-pc) application (Outlook 2016, 2019, 2021 or Microsoft 365) on Windows.
- Have administrator access to the client computer to edit the Windows registry.
- The OVHcloud SRV record must be correctly configured in the domain name's DNS zone. See our guide [Add a domain name to your Exchange service](/en/guides/web-cloud/email-and-collaborative-solutions/microsoft-exchange/exchange-adding-domain.md).

***
### OVHcloud Control Panel Access
- **Direct link:** <ManagerLink to="/#/web/exchange">Exchange</ManagerLink>
- **Navigation path:** <code className="action">Web Cloud</code> > <code className="action">Exchange</code> > Select your platform
***


Information regarding the management and configuration of OVHcloud services

OVHcloud provides services which you are responsible for with regard to their configuration and management. You are therefore responsible for ensuring they function correctly.
This guide is designed to assist you in common tasks as much as possible. Nevertheless, we recommend that you contact a [specialist service provider](https://partner.ovhcloud.com/en-gb/directory/) and/or the software publisher if you experience any difficulties. OVHcloud cannot provide you with technical support in this regard. You can find more information in the "[Go further](#go-further)" section of this guide.

## Instructions

### Understanding the problem

Microsoft introduced an Outlook feature called "Direct Connect to Office 365". When it is active, Outlook connects directly to the Office 365 autodiscover and ignores your Exchange server's autodiscover URL.

This server can be an Exchange installed on your company's premises (on-premises) or a Hosted Exchange OVHcloud solution. **A Hosted Exchange solution is not hosted on the Office 365 / Microsoft 365 servers**: it is an Exchange server hosted on the OVHcloud servers.

Outlook then queries Office 365, assuming the mailbox is in the Microsoft cloud, instead of first checking the Exchange OVHcloud server's autodiscover. This triggers the repeated Microsoft sign-in windows.

When you add the account, this automatic settings lookup (autodiscover) is visible at the "Searching for your mail server settings" step:

![Outlook wizard searching for the mail server settings when adding an account](/images/web-cloud/email-and-collaborative-solutions/microsoft-exchange/outlook-connecting-to-office-365/outlook-add-account-searching-settings.png)
### Identifying the symptoms

You are likely affected by this problem if you notice the following:

- A Microsoft 365 sign-in window appears repeatedly in Outlook and keeps asking for credentials.

- The message "Tell us the account you want to use to open autodiscover.xml" appears.

  <img className="thumbnail" alt="Microsoft 365 sign-in window in Outlook asking for the account to open autodiscover.xml" src="/images/web-cloud/email-and-collaborative-solutions/microsoft-exchange/outlook-connecting-to-office-365/outlook-office365-signin-prompt.png" loading="lazy" />

- The window persists after restarting Outlook or creating a new Outlook profile.

- The mailbox is nonetheless correctly hosted on Exchange OVHcloud and the OVHcloud autodiscover is correctly configured.

- A red error message "This username may be incorrect…" may appear when the account you entered is not recognised by the Microsoft 365 tenant.

  <img className="thumbnail" alt="Red error message 'This username may be incorrect' in the Microsoft sign-in window" src="/images/web-cloud/email-and-collaborative-solutions/microsoft-exchange/outlook-connecting-to-office-365/outlook-office365-username-incorrect-error.png" loading="lazy" />

### Checking that the mailbox is hosted on Exchange OVHcloud

Before applying the fix, check that the OVHcloud-side configuration is correct:

- Check that the domain name's `_autodiscover` SRV record points to the OVHcloud servers, as described in the guide [Add a domain name to your Exchange service](/en/guides/web-cloud/email-and-collaborative-solutions/microsoft-exchange/exchange-adding-domain.md).

  <img className="thumbnail" alt="DNS zone of the domain name in the OVHcloud Control Panel with the _autodiscover SRV record" src="/images/web-cloud/email-and-collaborative-solutions/microsoft-exchange/outlook-connecting-to-office-365/ovhcloud-manager-dns-zone-srv-autodiscover.png" loading="lazy" />

- Run a diagnostic from your Control Panel to confirm the account status, following the guide [Using the Exchange error diagnostic](/en/guides/web-cloud/email-and-collaborative-solutions/microsoft-exchange/diagnostic-advanced.md).

If the OVHcloud configuration is correct but the sign-in windows persist, the cause is on the client side: Outlook favours the Office 365 endpoint.

### Identifying the cause

This behaviour is triggered in 2 main situations:

- **The domain name has been declared on an Office 365 tenant.** When you add a domain to a Microsoft 365 tenant, Microsoft assumes that the mailboxes for that domain are in the cloud. Outlook then connects to the Office 365 autodiscover instead of the OVHcloud one.
- **An identical account has been created in Office 365.** If a mailbox or user with the same email address (or the same UPN) exists in a Microsoft 365 tenant, Outlook may be redirected to that cloud account rather than to your Exchange OVHcloud account.

:::tip
If you no longer use Office 365 for this domain, also consider removing the relevant domain or account from the Microsoft 365 tenant. The fix below remains necessary, however, as long as Outlook continues to favour the Office 365 endpoint.
:::

### Applying the fix: the `ExcludeExplicitO365Endpoint` registry key

To prevent Outlook from using the explicit Office 365 endpoint during autodiscover, add a registry key on the client computer.

:::warning
Editing the Windows registry is a sensitive operation. A mistake can prevent the system or applications from working correctly. We recommend backing up the registry before making any changes.
:::

#### Using the Registry Editor

1. Open the **Registry Editor** (`regedit`) in the session of the affected user on the client computer.

   <img className="thumbnail" alt="Windows search showing the Registry Editor application and the Run as administrator option" src="/images/web-cloud/email-and-collaborative-solutions/microsoft-exchange/outlook-connecting-to-office-365/windows-search-registry-editor-run-as-admin.png" loading="lazy" />

2. Go to the following key. If the `AutoDiscover` subkey does not exist, create it:

```text
HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\AutoDiscover
```

The version number `16.0` corresponds to Outlook 2016, 2019, 2021 and Microsoft 365.

3. Create a new **DWORD (32-bit) value**, name it `ExcludeExplicitO365Endpoint` and set its value to `1`.
4. Close the Registry Editor.

![Windows Registry Editor showing the ExcludeExplicitO365Endpoint value set to 1](/images/web-cloud/email-and-collaborative-solutions/microsoft-exchange/outlook-connecting-to-office-365/registry-editor-exclude-explicit-o365-endpoint.png)
#### Using the command line

You can also add the key with a single command in a command prompt:

```bat
reg add HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\AutoDiscover /t REG_DWORD /v ExcludeExplicitO365Endpoint /d 1
```

:::warning
On Windows 11 with Office 2024 LTSC (and, more broadly, on recent versions), the `AutoDiscover` key is no longer in the system context but in the **context of the logged-in user**. Therefore, launch the Registry Editor (or the command prompt) in the session of the affected user, not as an administrator of another account.
:::

### Checking the connection to Exchange OVHcloud

Start Outlook and check that the Microsoft 365 sign-in window no longer appears. Outlook now connects directly to your Exchange OVHcloud server rather than to Office 365 / Microsoft 365.

There is no need to recreate the Outlook profile after adding the registry key.

To confirm the connection, open classic Outlook and look at the **status bar** at the bottom of the window: it should display **Connected to: Microsoft Exchange**. Outlook is then communicating with your Exchange OVHcloud server, and no longer with Office 365:

![Classic Outlook interface with the status bar showing 'Connected to: Microsoft Exchange' at the bottom of the window](/images/web-cloud/email-and-collaborative-solutions/microsoft-exchange/outlook-connecting-to-office-365/outlook-classic-status-bar-connected-to-exchange.png)
To check the exact server name (<Tooltip content="The `?` represents your Exchange OVHcloud server number (for example `ex1`, `ex2`, `ex3`…), which varies depending on the infrastructure hosting your mailbox.">`ex?.mail.ovh.net`</Tooltip>), hold down the **Ctrl** key and right-click the Outlook icon in the Windows notification area, then select **Connection Status**.


:::danger
If you plan to migrate mailboxes to Office 365 / Exchange Online later, remember to **delete the `ExcludeExplicitO365Endpoint` registry key**. As long as it is present, it prevents Outlook from connecting to Exchange Online.
:::

## Go further [](#)
:::info
For more information about the autodiscover feature and Outlook configuration, see [the Microsoft help centre](https://support.microsoft.com/en-gb/Outlook/getstarted/add-an-email-account-to-outlook-for-windows).
:::

[Exchange - Configure your email account on classic Outlook for Windows](/en/guides/web-cloud/email-and-collaborative-solutions/microsoft-exchange/how-to-configure-outlook-2016.md)

[Using the Exchange error diagnostic](/en/guides/web-cloud/email-and-collaborative-solutions/microsoft-exchange/diagnostic-advanced.md)

[Add a domain name to your Exchange service](/en/guides/web-cloud/email-and-collaborative-solutions/microsoft-exchange/exchange-adding-domain.md)

Join our [community of users](https://community.ovhcloud.com/).
