HTTP 401 Unauthorized response when testing ActiveSync or Outlook Anywhere

Gerrit Deike 21 Reputation points
2020-11-23T10:12:30.933+00:00

Hi!

I'm completely stumped. I've configured remote access for a customer who only has a Fritzbox as router. I've published HTTP and HTTPS and can reach OWA without any problems, but when I test ActiveSync with testconnectivity.microsoft.com I get the following error:

Attempting to send an Autodiscover POST request to potential Autodiscover URLs.
Autodiscover settings weren't obtained when the Autodiscover POST request was sent.
Test Steps

The Microsoft Connectivity Analyzer is attempting to retrieve an XML Autodiscover response from URL https://autodiscover.<CompanyName>:443/Autodiscover/Autodiscover.xml for user pcmgmbh@mrw-kranservice.de.
The Microsoft Connectivity Analyzer failed to obtain an Autodiscover XML response.
Additional Details
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 Office 365 service, ensure you are using your full User Principal Name (UPN).
HTTP Response Headers:
Connection: keep-alive
request-id: 032846bb-2c20-4693-99b3-3fbce2f84b07
Content-Length: 0
Date: Mon, 23 Nov 2020 09:40:45 GMT
Set-Cookie: __cfduid=d8679b1f692bb74eebfa4927e5a983e0e1606124444; expires=Wed, 23-Dec-20 09:40:44 GMT; path=/; domain=.<CompanyName>; HttpOnly; SameSite=Lax; Secure
WWW-Authenticate: Negotiate
WWW-Authenticate: NTLM
WWW-Authenticate: Basic realm="autodiscover.<CompanyName>"
X-Powered-By: ASP.NET
X-FEServer: MRW-EXCH-SRV-1
CF-Cache-Status: DYNAMIC
cf-request-id: 069613352f000034de412e5000000001
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Report-To: {"endpoints":[{"url":"https://a.nel.cloudflare.com/report?s=LB4U7bcxLb6rPXW1ZmkFF%2BFbv74Rm3lgmNyIlsdiuCZZzuI38az8DHUMwBE7I889%2BhSKSX%2FzOWsK9c9kgtbV3pS8lYTAJ%2B18%2FZqrs8Enn5xUuKbFhQePNw%2FzYvE%2BiL6C"}],"group":"cf-nel","max_age":604800}
NEL: {"report_to":"cf-nel","max_age":604800}
Server: cloudflare
CF-RAY: 5f69ee351af034de-DUB

Any ideas how I can fix this problem? The Username and password are correct and have been tested!

Thanks for any help in advace.

Best Regards,

Gerrit Deike

Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,626 questions
0 comments No comments
{count} votes

Accepted answer
  1. Lucas Liu-MSFT 6,176 Reputation points
    2020-11-24T06:19:26.063+00:00

    Hi @Gerrit Deike ,
    What is your Exchange version and environment?
    1.Is there a problem with the internal connection that you Autodiscover serivce? If you have an internally connected Outlook client, please try to hold down "Ctrl" and right-click the Outlook icon, select "Test Email AutoConfiguration" to check the status of your Autodiscover service. And I noted that “This is usually the result of an incorrect username or password. If you are attempting to log onto an Office 365 service, ensure you are using your full User Principal Name (UPN).”, Please check from the result of “Test Email AutoConfiguration”, whether Outlook tries to lookup office365.
    42026-3333.png

    2.Please run the following command to check if your Autodiscover url is correct.

    Get-ClientAccessService | fl *uri*  
    

    3.Please run the following command to check the authentication of the Autodiscover, and check the authentication methods in IIS.

    Get-Autodiscovervirtualdirectory -Server <> | fl *auth*  
    

    42101-22222.png
    For more information : Default settings for Exchange virtual directories
    4.If only the external connection has this problem.

    1. Please check your DNS record, include A, MX and CNAME. Especially CNAME, make sure to point to the correct server.
    2. You also could following the format to create a SRV record:
      Service: _autodiscover
      Protocol: ._tcp
      Port Number: 443
      Host: mail.contoso.com
      The Outlook server namespace is mail.contoso.com.
      For more information you could refer to:Autodiscover in DNS

    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

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.