Search code examples
exchange-serveroutlook-web-app

'503 Failed authentication on backend server: Unauthorized' when logging on to OWA


When logging on to OWA using a browser, receive a 503 error. In the Fiddler trace will see a more detailed response status code: 503 Failed authentication on backend server: Unauthorized

On the Exchange Server, see the following System event log (intermittently):

Event 4 Security-Kerberos
The Kerberos client received a KRB_APP_ERR_MODIFIED error from the server exchangeserver$.  
The target name used was HTTP/exchangeserver.ad.root.  
This indicates that the target server failed to decrypt the ticket provided by the client.

Solution

  • I hope someone only receives this in a lab environment!

    Here is a link to enable Kerberos logging, which could be helpful as well: https://learn.microsoft.com/en-us/troubleshoot/windows-server/identity/enable-kerberos-event-logging

    After enabling Kerberos logging, would see the KRB_APP_ERR_MODIFIED error more frequently, whereas before would not be logged each time a logon attempt occurred.

    The issue here (in the lab) was that a duplicate SPN for the Exchange Server in question was added erroneously to another server, causing a duplicate. This was due to trying to enable Kerberos delegation for a separate web application.

    Although there could be a quicker way to do this, you can list the SPNs on each server to look for your erroneous exchangeserver record by running

    setspn -l otherservername (this is a lower-case L)
    

    And if you find that SPNs like http/exchangeserver or http/exchangeserver.ad.root are listed on another server (say 'otherservername'), you can carefully remove them by running

    setspn -D http/exchangeserver otherservername
    setspn -D http/exchangeserver.ad.root otherservername
    

    I was able to logon to OWA immediately after the duplicate SPN was removed, without restarting any servers or services.