.NET MAUI Android HttpClient – SSL Certificate Validation Error (Trust Anchor for Certification Path Not Found)

Vignesh Palthurai 70 Reputation points
2026-12-03T15:03:21.56+00:00

Hi ,

I'm facing an SSL certificate validation issue while calling our API from a .NET MAUI Android application.

Our API is hosted behind Azure Application Gateway, and we are using the Application Gateway URL provided by our backend team.

The same API is working as expected in Postman, and I'm able to retrieve the response successfully.

I also tested the endpoint directly using the Chrome browser in BrowserStack App Live, and it returns the response successfully. However, when I call the same endpoint from our MAUI Android application, I'm unable to retrieve the response.

While debugging the application, I found the following exception:

Java.Security.Cert.CertPathValidatorException: Trust anchor for certification path not found

Things we have verified so far:

  1. The API is working in Postman, with SSL certificate verification enabled.

The endpoint returns a response when accessed directly through the BrowserStack Chrome browser.

Our backend team confirmed that a valid SSL certificate is configured on the Application Gateway.

The certificate chain was checked, and the team confirmed that the Android and Apple certificate checker results are the same.

We are using the standard HttpClient in our MAUI application without any custom certificate validation handler.

I also tried configuring Android Network Security Config to trust system and user certificates in Debug mode, but the issue still persists.

Development Environment:

.NET MAUI 10

Android application

Testing using a local Android emulator and BrowserStack App Live

Standard HttpClient

Could you please help us identify why the Android application is failing to validate the SSL certificate even though the same API works in Postman and the browser?

Is there any additional configuration required in .NET MAUI Android or Android HttpClient to resolve this issue?

Thanks.

Developer technologies | .NET | .NET Multi-platform App UI
0 comments No comments

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 85,506 Reputation points
    2026-12-03T17:46:04.4233333+00:00

    Both IOS and Android are fussier about certificate chains. Also application code can not override certificate validation. you can use ssl labs certificate test to help debug:

    https://www.ssllabs.com/ssltest/

    note: your network team probably installed the Azure Application Gateway ssl certificate. Be sure is not a self signed certificate and a publicly trusted provider.

    if you control the Android devices you can manually install and trust the certificate. google for instructions for your particular device.

    Was this answer helpful?

    0 comments No comments

Your answer

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