skip to Main Content

Prevent Outlook from connecting to Office 365

Users get a Microsoft credential prompt in the Outlook client. This does not matter when you restart Outlook or create a new Outlook profile. It keeps prompting for the Office 365/Microsoft 365 credentials. But, the mailboxes are not in the cloud and are in Exchange on-premises. Why do you get a Microsoft cloud credential prompt in Outlook? In this article, you will learn how to prevent Outlook from connecting to Office 365.

Microsoft sign in prompt in Outlook

The Microsoft sign in window will never end and keep prompting for the Microsoft credentials. In addition, the mailbox will not connect to Exchange on-premises.

Let’s look at what’s happening and when the Microsoft sign in prompt shows up.

Start Outlook

You already have an Outlook profile in Outlook, and start Outlook. A Microsoft sign in prompt shows up. Down below in the status bar, it shows Trying to connect.

Let’s fill in the email address and click Next.

Microsoft sign in prompt

The Microsoft sign in window shows:

This username may be incorrect. Make sure you typed it correctly. Otherwise, contact your admin.

Microsoft sign in prompt this username may be incorrect

Let’s try to create a new Outlook profile.

Create new Outlook profile

Create a new Outlook profile on the client. Fill in the credentials and click Next to start configuring the Outlook profile.

It will search for the user settings.

Prevent Outlook from connecting to Office 365 configure new profile

The Microsoft sign in window shows up. The Microsoft sign in is a bit different than the previous one. It shows a message: Tell us the account you want to use to open autodiscover.xml.

Let’s fill in the email address and click Next.

Prevent Outlook from connecting to Office 365 new profile error 1

The Microsoft sign in window shows the same error as the previous:

This username may be incorrect. Make sure you typed it correctly. Otherwise, contact your admin.

Prevent Outlook from connecting to Office 365 new profile error 2

Why do we get this error, and what is the solution to prevent Outlook from showing the Microsoft sign in prompt.

Direct connect to Office 365

Microsoft added a new feature in Outlook that will force Outlook clients to connect to Office 365/Microsoft 365:

  • Outlook 2016
  • Outlook 2019
  • Outlook Microsoft 365

Outlook connects to Office 365 and bypasses the Exchange Server autodiscover URL. This can be your Exchange Server on-premises or Hosted Exchange. Hosted Exchange is not Office 365/Microsoft 365, and it’s Exchange on-premises in the cloud.

When Microsoft sign in prompt start to show up

The Microsoft credential prompts start to happen when you add a new domain to Microsoft 365 tenant. Microsoft thinks the mailbox is in the cloud and will connect to the Microsoft 365 autodiscover URL. Instead, it should check the Exchange Server on-premises autodiscover first.

The organization has the required autodiscover URL set and correctly configured. However, they keep getting the Microsoft sign in prompts.

Stop Outlook connecting to Office 365

To block Outlook from connecting to Office 365, follow the below steps:

Open Registry Editor as administrator on the client.

Prevent Outlook from connecting to Office 365 registry editor

Navigate to the below registry subkey. If you don’t see the AutoDiscover subkey, create the subkeys.

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

The registry path corresponds to the Outlook version:

Outlook versionRegistry subkey version
Outlook 201616.0
Outlook 201916.0
Outlook Microsoft 36516.0

Create a DWORD (32-bit) Value. Give it the name ExcludeExplicitO365EndPoint and the value 1.

Prevent Outlook from connecting to Office 365 add registry key

Restart Outlook on the system. Sometimes, you have to restart the system to have the change take effect.

Verify connection to Microsoft Exchange on-premises

Start Outlook and verify that the Microsoft sign in prompt in Outlook does not appear. It connects directly to the Exchange Server on-premises and not to Microsoft 365/Office 365.

Note: You don’t have to re-create the profiles on the clients after adding the registry key.

Prevent Outlook from connecting to Office 365 success

Create a new Outlook profile and verify that the Microsoft sign in prompt doesn’t appear.

Prevent Outlook from connecting to Office 365 success add account

Note: Don’t forget to remove the registry key once you start migrating mailboxes to Office 365.

Did this help you to fix the Microsoft sign in prompts?

Read more: Outlook prompts for password after migration to Office 365 »

Conclusion

You learned how to prevent Outlook from connecting to Office 365. The solution is to add the ExcludeExplicitO365Endpoint registry key to the client with a value of 1. After testing with one client, deploy it with a GPO to all the clients. No more Microsoft credential prompts in Outlook. Don’t forget to remove the registry key once you start to migrate mailboxes to Office 365.

Did you enjoy this article? You may also like Certificate warning during or after a new Exchange Server installation. Don’t forget to follow us and share this article.

ALI TAJRAN

ALI TAJRAN

ALI TAJRAN is a passionate IT Architect, IT Consultant, and Microsoft Certified Trainer. He started Information Technology at a very young age, and his goal is to teach and inspire others. Read more »

This Post Has 0 Comments

Leave a Reply

Your email address will not be published.