Autodiscover not working HTTP 401 Unauthorized

Alex Bedard 0 Reputation points
2025-05-06T02:44:30.5866667+00:00

Having trouble getting our autodiscover working, looks like it may have broken after the last major CU, but could have been earlier.

Exchange 2019 on latest CU, all roles on single server.

Did a rebuild of the virtual folder, certificates are all valid, services all running, but getting the same error.

Trying to access mail.contoso.com/autodiscover/autodiscover.xml prompts for a username and password but doesn't accept anything we enter.

Email and outlook is working fine otherwise.

Remote Connectivity analyzer response:

An HTTP 401 Unauthorized response was received from the remote Unknown server. This is usually the result of an incorrect username or password. If you are attempting to log onto an Microsoft 365 service, ensure you are using your full User Principal Name (UPN).
HTTP Response Headers: request-id: 1192a9f0-465c-4f7e-9ecd-417eaacaac39
X-OWA-Version: 15.2.1544.14
Server: Microsoft-IIS/10.0
WWW-Authenticate: Negotiate WWW-Authenticate: NTLM
WWW-Authenticate: Basic realm="autodiscover.contoso.com"

X-Powered-By: ASP.NET X-FEServer: EXCHANGE2019

Strict-Transport-Security: max-age=31536000; includeSubDomains; preload

Date: Tue, 06 May 2025 02:28:15 GMT

Content-Length: 0

Exchange Exchange Server Management
{count} votes

1 answer

Sort by: Most helpful
  1. Amit Singh 5,306 Reputation points
    2025-05-06T03:56:09.28+00:00

    Hi @Alex Bedard , The issue is likely related to authentication settings on the autodiscover virtual directory or IIS config. Outlook works because it uses other methods, but web-based access (used by tools) is more sensitive to these settings. You can check these blog1 and blog2 for configure autodiscover service in Exchange Server and fix IIS virtual directory error.

    https://learn.microsoft.com/en-us/powershell/module/exchange/set-autodiscovervirtualdirectory?view=exchange-ps

    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

    If the response is helpful, please click "Accept Answer" and upvote it.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.