Microsoft graph api Azure:PKIX路径生成失败:sun.security.provider.certpath.SunCertPathBuilderException:找不到有效的证书路径来请求目标

Microsoft graph api Azure:PKIX路径生成失败:sun.security.provider.certpath.SunCertPathBuilderException:找不到有效的证书路径来请求目标,microsoft-graph-api,azure-ad-b2c,msal,azure-ad-b2b,Microsoft Graph Api,Azure Ad B2c,Msal,Azure Ad B2b,我们有一个托管在intranet上的应用程序,我们正在尝试为此配置Azure SSO。登录页面将被重定向到Microsoft登录门户,我们将收到授权代码。但是,当我们试图将请求发回Microsoft以获取令牌时,我们会遇到此特定错误 **sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: u

我们有一个托管在intranet上的应用程序,我们正在尝试为此配置Azure SSO。登录页面将被重定向到Microsoft登录门户,我们将收到授权代码。但是,当我们试图将请求发回Microsoft以获取令牌时,我们会遇到此特定错误

**sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949)
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302)
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296)
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1509)
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)
    at sun.security.ssl.Handshaker.process_record(Handshaker.java:914)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
   at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1283)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1258)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250)**

我们通过从浏览器下载证书并将其导入jdk/jre/lib/security/cacerts来放置证书。已启用Web代理以访问internet。我们已经没有办法解决这个问题了。任何帮助都将不胜感激。

似乎许多用户对
PKIX路径构建失败有类似的问题:SunCertPathBuilderException:无法找到请求目标的有效认证路径
,以下是高分答案:


基于:

似乎许多用户对
PKIX路径构建失败有类似的问题:SunCertPathBuilderException:无法找到请求目标的有效认证路径
,以下是高分答案:


基于:

根证书似乎已经存在于cacerts中。关于证书导入,我们已经下载了证书并将其导入jdk/jre/lib/security中的cacerts中,但仍然没有解决问题的任何运气Hello@SumitMishra您是否检查了此解决方案:?如果此解决方案无法解决您的问题,请告诉我。如果此答案对您有帮助,请告诉我们。如果是这样,请记住使用复选标记将其标记为答案,以便社区中有类似问题的其他人可以更轻松地找到解决方案。另外,请抽出几分钟时间让我们知道我们如何使用此链接<>根证书似乎已经存在于cacerts中。关于证书导入,我们已经下载了证书并将其导入jdk/jre/lib/security中的cacerts中,但仍然没有解决问题的任何运气Hello@SumitMishra您是否检查了此解决方案:?如果此解决方案无法解决您的问题,请告诉我。如果此答案对您有帮助,请告诉我们。如果是这样,请记住使用复选标记将其标记为答案,以便社区中有类似问题的其他人可以更轻松地找到解决方案。另外,请抽出几分钟让我们知道我们是如何使用此链接的<>