Exchange ServerTroubleshooting

"The connection to Microsoft Exchange is unavailable": fixing Outlook on Exchange Server

Outlook shows Disconnected or can't create a profile against Exchange Server. Check the user's MAPI settings, Autodiscover, the MAPI virtual directory, healthcheck.htm and load balancer probes.

On Exchange Server 2016 and later, Outlook reaches the mailbox with MAPI over HTTP, and when any link in that path breaks, users see "The connection to Microsoft Exchange is unavailable" or a status bar stuck on Disconnected. In this post I'll walk the chain from the user's protocol settings through Autodiscover, the MAPI virtual directory and the app pools to the load balancer, with a check and a healthy result for each link.

Errors this guide fixes

  • The connection to Microsoft Exchange is unavailable. Outlook must be online or connected to complete this action.Outlook (new profile)+1 more guide
  • Microsoft Exchange is not available. Either there are network problems or the Exchange server is down for maintenance.Outlook (public folders, online archive)
  • DisconnectedOutlook status bar
  • Cannot expand the folder.Outlook (public folders, online archive)
How this guide is organised: Symptoms → Why it happens → How to fix it → Verify the fix → Prevent it next timeFlow diagram of the article's sections in reading order: 1. Symptoms. 2. Why it happens. 3. How to fix it (6 steps: Rule out the mailbox's protocol settings; Confirm Autodiscover returns MAPI URLs; Check the MAPI virtual directory on every server; Check components, health and app pools; Test healthcheck.htm and fix the load balancer; Check the client). 4. Verify the fix. 5. Prevent it next time. Toolbox: Get-CASMailbox, Get-MapiVirtualDirectory, Get-ServerComponentState, …\Microsoft\Exchange, /mapi/healthcheck.htm.1Symptoms2Why it happens3How to fix it4Verify the fix5Prevent it nexttime1Rule out themailbox's prot…2ConfirmAutodiscover…3Check theMAPI virtual d…4Checkcomponents…5Testhealthcheck.…6Check theclientTOOLBOXGet-CASMailboxGet-MapiVirtualDirectoryGet-ServerComponentState…\Microsoft\Exchange/mapi/healthcheck.htmHow this guide is organised: Symptoms → Why it happens → How to fix it → Verify the fix → Prevent it next timeFlow diagram of the article's sections in reading order: 1. Symptoms. 2. Why it happens. 3. How to fix it (6 steps: Rule out the mailbox's protocol settings; Confirm Autodiscover returns MAPI URLs; Check the MAPI virtual directory on every server; Check components, health and app pools; Test healthcheck.htm and fix the load balancer; Check the client). 4. Verify the fix. 5. Prevent it next time. Toolbox: Get-CASMailbox, Get-MapiVirtualDirectory, Get-ServerComponentState, …\Microsoft\Exchange, /mapi/healthcheck.htm.1Symptoms2Why it happens3How to fix it1Rule out the mailbox's protocol settings2Confirm Autodiscover returns MAPI URLs3Check the MAPI virtual directory on everyserver4Check components, health and app pools5Test healthcheck.htm and fix the load balancer6Check the client4Verify the fix5Prevent it next timeTOOLBOXGet-CASMailboxGet-MapiVirtualDirectoryGet-ServerComponentState…\Microsoft\Exchange/mapi/healthcheck.htm
At a glance: how this guide is organised · 6 fix steps · 5 key tools

Symptoms#

Creating a profile fails, often right after Autodiscover seemed to succeed:

Text
The action cannot be completed. The connection to Microsoft Exchange is unavailable.
Outlook must be online or connected to complete this action.
  • Existing profiles show Disconnected in the status bar.
  • Opening public folders or an online archive fails with Cannot expand the folder. Microsoft Exchange is not available. Either there are network problems or the Exchange server is down for maintenance.
  • OWA works for the same user, so the account and the mailbox database are fine.
  • If users fail on and off, suspect one server behind the load balancer; if everyone fails right after patching, suspect server state.

Why it happens#

Outlook gets its MAPI over HTTP URLs from Autodiscover, then opens HTTPS sessions to /mapi/emsmdb (the mailbox) and /mapi/nspi (the address book) on your namespace. The front end on any Mailbox server proxies them to the Exchange Back End website on the server that holds the active database copy. A break anywhere on that path produces the same message:

LayerWhat goes wrongCheck
MailboxMAPI disabled for the user, or MAPI over HTTP turned off with no working fallbackGet-CASMailbox
AutodiscoverNo settings, or URLs pointing at the wrong nameTest E-mail AutoConfiguration
Virtual directoryMissing URLs, changed authenticationGet-MapiVirtualDirectory
ServerMAPI app pools stopped, components left Inactive after maintenanceGet-ServerComponentState, IIS
Load balancerProbe checks only OWA, SSL offloading with Extended Protection/mapi/healthcheck.htm
ClientRegistry value that disables MAPI over HTTPHKCU\Software\Microsoft\Exchange

How to fix it#

1. Rule out the mailbox's protocol settings#

PowerShell
Get-CASMailbox jane@contoso.com | Format-List *Mapi*
Get-OrganizationConfig | Format-List MapiHttpEnabled
Set-CASMailbox jane@contoso.com -MAPIEnabled $true

MAPIEnabled must be True; when it's False, Outlook shows exactly the errors above. The mailbox-level MapiHttpEnabled is normally empty, which means it follows the organization setting. If someone set it to False while testing, clear it with Set-CASMailbox jane@contoso.com -MapiHttpEnabled $null.

2. Confirm Autodiscover returns MAPI URLs#

Run Test E-mail AutoConfiguration (Ctrl + right-click the Outlook icon in the notification area). The Results tab should list URLs such as https://mail.contoso.com/mapi/emsmdb/?MailboxId=<GUID>@contoso.com on your namespace. If Autodiscover fails, fix that first with Autodiscover troubleshooting for Exchange Server; Outlook can't connect to URLs it never received.

3. Check the MAPI virtual directory on every server#

PowerShell
Get-MapiVirtualDirectory | Format-List Server, InternalUrl, ExternalUrl, IISAuthenticationMethods
Set-MapiVirtualDirectory -Identity "EX01\mapi (Default Web Site)" `
    -InternalUrl https://mail.contoso.com/mapi -ExternalUrl https://mail.contoso.com/mapi

Both URLs should use the load-balanced name on your certificate, identical on every server. If ExternalUrl is empty, clients outside the network aren't offered MAPI over HTTP. IISAuthenticationMethods normally includes Ntlm, Negotiate and OAuth; keep OAuth if you use Hybrid Modern Authentication.

4. Check components, health and app pools#

PowerShell
Get-ServerComponentState EX01 | Where-Object State -ne "Active" | Format-Table Component, State
Get-HealthReport EX01 | Where-Object { $_.HealthSet -like "*Mapi*" -or $_.HealthSet -like "Outlook*" } |
    Format-Table HealthSet, AlertValue
Import-Module WebAdministration
Get-ChildItem IIS:\AppPools | Where-Object { $_.Name -like "MSExchangeMapi*" } | Select-Object Name, State

ForwardSyncDaemon and ProvisioningRps are normally Inactive on-premises. Anything else Inactive, such as ServerWideOffline, usually means a server was left in maintenance mode after patching:

PowerShell
Set-ServerComponentState EX01 -Component ServerWideOffline -State Active -Requester Maintenance

Then complete the remaining exit steps from DAG maintenance mode. The MAPI app pools (MSExchangeMapiFrontEndAppPool, MSExchangeMapiMailboxAppPool and MSExchangeMapiAddressBookAppPool) must all be Started. Restart-WebAppPool MSExchangeMapiFrontEndAppPool recycles one without an iisreset; if a pool keeps stopping, look for w3wp.exe crashes in the Application log.

5. Test healthcheck.htm and fix the load balancer#

PowerShell
Invoke-WebRequest https://mail.contoso.com/mapi/healthcheck.htm -UseBasicParsing | Select-Object StatusCode, Content

A healthy server answers 200 with 200 OK and its own FQDN in the body. Each protocol has its own page (/owa, /ews, /mapi, /rpc, /oab, /Microsoft-Server-ActiveSync, /autodiscover), and it stops returning 200 when Managed Availability takes that protocol offline or its component is set Inactive. If your load balancer probes only /owa/healthcheck.htm, a server whose MAPI stack is down keeps receiving Outlook traffic, so probe /mapi/healthcheck.htm for the MAPI service. Also make sure the load balancer doesn't offload SSL, which Extended Protection doesn't support, and that its certificate is valid for the namespace.

6. Check the client#

A MapiHttpDisabled DWORD set to 1 under HKCU\Software\Microsoft\Exchange stops Outlook from using MAPI over HTTP; it's sometimes left behind by an old script or policy. Remove it unless you deliberately rely on Outlook Anywhere, then restart Outlook.

Verify the fix#

  • Ctrl + right-click the Outlook icon › Connection Status: every line shows Established with protocol HTTP, and the Req/Fail column shows no new failures.
  • A new profile completes, and the Outlook tests on the Exchange Server tab of the Microsoft Remote Connectivity Analyzer pass from outside.
  • The HttpProxy log shows successful requests for the user:
PowerShell
$log = Join-Path $env:ExchangeInstallPath "Logging\HttpProxy\Mapi"
Get-ChildItem $log | Sort-Object LastWriteTime | Select-Object -Last 1 | Select-String "jane" | Select-Object -Last 5

Prevent it next time#

  • Probe each protocol separately on the load balancer, and drain servers through maintenance mode before patching.
  • After every update, confirm all components are Active and run the Health Checker; install updates elevated, as covered in installing Exchange security updates.
  • Keep virtual directory URLs identical on every server and covered by the certificate.
  • Record any per-mailbox protocol changes made during testing, and undo them afterwards.

References#

Written and checked against current Microsoft Learn documentation. Test changes with a pilot group before rolling them out to everyone, and if an admin center path has moved since, search for the setting name instead.

Spotted a mistake, or did this fix work differently for you? Email me or message me on LinkedIn — corrections are credited in the article.

Written by

Omer Eltayeb

Intune Subject Matter Expert in Cairo, Egypt, former Microsoft Cloud Solutions Architect, Microsoft Certified Trainer and Microsoft Innovative Educator Expert (2024–26) and Microsoft Elevate Educator Expert (2026–27). I share practical, step-by-step guides, study plans, scripts and toolkits for Microsoft Intune, Configuration Manager, Microsoft Entra ID, Microsoft Defender, Exchange and Microsoft 365 with the community.

Microsoft Certified Trainer (MCT) 2026Microsoft Innovative Educator Expert 2025–2026Microsoft Elevate Educator Expert 2026–2027ISC2 Certified Information Systems Security Professional (CISSP)Microsoft 365 Certified: Enterprise Administrator Expert (MS-102)