Outlook: The Connection to Microsoft Exchange is Unavailable

PowerADM.com / Exchange / Outlook: The Connection to Microsoft Exchange is Unavailable

In some cases, you may receive an error when you try to configure a connection to Exchange Server in Outlook Client for a new user, or when you try to connect to an Exchange mailbox server with a configured Outlook: the connection to Microsoft Exchange is unavailable. This article will show you how to troubleshoot and fix this error.

The connection to Microsoft Exchange is unavailable. Outlook must be online or connected to complete this action.

The connection to Microsoft Exchange is unavailable, Outlook must be online or connected

First, check that the Autodiscover service is working correctly on the Exchange server.

The Outlook client uses Exchange Autodiscover to automatically find and configure a connection to a user’s mailbox in Exchange. Thanks to the auto-discovery feature, all you have to do is enter the user’s e-mail address and password when you set up a connection in Outlook 2016/2019/365.

You can use the following PowerShell cmdlet to test AutoDiscover:

Test-OutlookWebServices –identity emusk@poweradm.com –MailboxCredential (Get-Credential)

If you have not installed the Exchange Management Shell module, hold down CTRL and right-click the Outlook icon in the Windows tray. Click Test E-mail AutoConfiguration.

Outlook - Test E-mail AutoConfiguration

In the window that opens, enter the user’s email address, select Use Autodiscover, and click Test. If the Exchange Autodiscover service is available and configured correctly, the last line will display Succeeded.

Check Outlook Autodiscovery

When you connect to your published Exchange server over the Internet, you must use the Microsoft Remote Connectivity Analyzer service to check the DNS records, Autodiscover, and Exchange availability remotely (https://testconnectivity.microsoft.com/tests/Ola/input)

Select Exchange Server -> Outlook Connectivity, enter your mailbox email address on the Exchange Server, UPN, and password, solve the captcha, and click Test.

This test checks all stages of the connection from Outlook to a mailbox on the on-premises Exchange Server (including the RPC over HTTP and MAPI over HTTP protocols).

Microsoft Outlook Connectivity Analyzer

Suppose the client computer and the Exchange server + domain controller with the Global Catalog role are located in different AD sites. In that case, you need to create a custom registry parameter on the client machine.

  1. Open the registry editor (regedit.exe);
  2. Navigate to the registry key HKEY_CURRENT_USER\Software\Microsoft\Exchange\Exchange Provider (create this key manually if it is missing);
  3. Add a new REG_SZ parameter with the DS Server;
  4. Specify your domain controller’s FQDN with the Global Catalog role as a parameter value;
  5. Reboot your computer and create a new mail profile in Outlook.

If all users are complaining about a connection problem to Exchange from Outlook at the same time, Run the following commands in the Exchange Management Shell console on your Microsoft Exchange server with the CAS (Client Access Server) role:

Test-OutlookWebServices -ClientAccessServer exch1.poweradm.com|ft

Make sure all services return Success. Check that all URLs on the Exchange server are configured correctly for the OAB and Autodiscover mechanisms. Fix errors and run the command:

Test-WebServicesConnectivity -ClientAccessServer exch1.poweradm.com

Test-WebServicesConnectivity in Exchange Server

If any of the services are not working, check the status of the corresponding services on the Exchange server. Also, check that the Microsoft Exchange Attendant service is running.

Sometimes you may need to re-create the IIS virtual directories to fix the connectivity issue.

There are a couple of other ways to fix the problem on the Outlook side:

  1. You can re-create your Outlook mail profile in the Control Panel (Mail 32bit applet); Manage Outlook profiles with Mail 32bit app
  2. If RPC encryption is disabled on CAS servers (Set-RpcClientAccess –Server exch1.poweradm.com –EncryptionRequired:$False), turn it off in the settings of your Outlook profile (Encrypt data between Microsoft Office Outlook and Microsoft Exchange); Disable RPC encryption in Outlook
  3. You can check for an RPC connection in older versions of the Exchange Server by using the command: outlook /rpcdiag
  4. Check that you can access your mailbox from a browser using OWA (Outlook Web Access);
Leave a Reply

Your email address will not be published. Required fields are marked *