Fix AppGateway Backend Health Root Certificate does not match Trusted Root Certificate

Justin 20 Reputation points
2025-04-30T10:29:33.4666667+00:00

Backend Health Status: Unhealthy

Message: The root certificate of the server certificate used by the backend does not match the trusted root certificate added to the application gateway. Ensure that you add the correct root certificate to whitelist the backend

State:
In BackendSettings, "certificate is issued by a well-known CA" is set to "No" and the root certificate of the certificate chain is uploaded. The .cer-file was created by logging into the server and using the copy-to-file functionality applied to the root certificate as outlined in this article:
https://learn.microsoft.com/en-us/azure/application-gateway/application-gateway-backend-health-troubleshooting?WT.mc_id=Portal-Microsoft_Azure_HybridNetworking#trusted-root-certificate-mismatch-root-certificate-is-available-on-the-backend-server

In the Listener, the leaf/server certificate is uploaded which works which I tested by using the browser to navigate to the url I specified and checking the certificate.

In the Probe, the BackendSettings are referenced containing the root cert.

On the server, the three certificates (server, intermediate, root) are installed and in the appropriate locations (Personal, Intermediate CA, Trusted Root CA). Also, in the IIS Manager, the Default Website is configured using the server certificate.

Note:
First I closesly followed this article: https://learn.microsoft.com/en-us/azure/application-gateway/self-signed-certificates?WT.mc_id=Portal-Microsoft_Azure_HybridNetworking
But the backend health check reported, that an intermediate certificate was missing so I now use a certificate chain using an intermediate certificate.

Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
1,185 questions
{count} votes

Accepted answer
  1. Sindhuja Dasari 630 Reputation points Microsoft External Staff Moderator
    2025-04-30T14:09:03.6866667+00:00

    Hello Justin

    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this!

    Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept " the answer.

    Issue: Fix AppGateway Backend Health Root Certificate does not match Trusted Root Certificate

    Solution: Some settings for the server/leaf certificates were missing. By using a .cnf-file with following properties, the setup works:

    basicConstraints = CA:FALSE
    keyUsage = critical, digitalSignature, keyEncipherment
    extendedKeyUsage = serverAuth
    subjectAltName = @alt_names
    subjectKeyIdentifier = hash
    authorityKeyIdentifier = keyid, issuer
    
    [alt_names]
    DNS.1 = www.fabrikam.com
    # Add more DNS entries if needed
    # DNS.2 = another-domain.com
    

    If you have any other questions or are still running into more issues, please let me know.

    Thank you again for your time and patience throughout this issue.


    Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Justin 20 Reputation points
    2025-04-30T12:55:22.6733333+00:00

    It turned out that some settings for the server/leaf certificates were missing. By using a .cnf-file with following properties, the setup works for me:

    basicConstraints = CA:FALSE
    keyUsage = critical, digitalSignature, keyEncipherment
    extendedKeyUsage = serverAuth
    subjectAltName = @alt_names
    subjectKeyIdentifier = hash
    authorityKeyIdentifier = keyid, issuer
    
    [alt_names]
    DNS.1 = www.fabrikam.com
    # Add more DNS entries if needed
    # DNS.2 = another-domain.com
    
    0 comments No comments

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.