AzureAD / microsoft-authentication-library-for-java

Microsoft Authentication Library (MSAL) for Java http://aka.ms/aadv2
MIT License
288 stars 145 forks source link

SSHHandshakeException: PKIX Build failed. #743

Closed wise-coders closed 1 year ago

wise-coders commented 1 year ago

Library version used

1.14.3-beta

Java version

OpenJDK 19

Scenario

ConfidentialClient - web site (AcquireTokenByAuthCode)

Is this a new or an existing app?

This is a new app or experiment

Issue description and reproduction steps

I try to connect to AzureSQL using the beta release of msal4j, I got the exception as in the image. Is this a bug in the msal4j or some error on my side? I am using OpenJDK 19.

Relevant code snippets

No response

Expected behavior

No response

Identity provider

Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)

Regression

No response

Solution and workarounds

No response

wise-coders commented 1 year ago

image

Avery-Dunn commented 1 year ago

Hello @wise-coders : Are you using MSAL Java directly in your application? That error seems to be coming from a SQL Server or JDBC package that uses our msal4j package.

If you aren't using the msal4j package directly, then this likely a configuration issue or problem on the SQL/JDBC side. This exact error is mentioned in this post on the Azure Database Support Blog, and suggests there's an issue with the keystore: https://techcommunity.microsoft.com/t5/azure-database-support-blog/pkix-path-building-failed-unable-to-find-valid-certification/ba-p/2591304