gpt4 book ai didi

Java JDBC ActiveDirectoryAuthentication Azure SQLServer 失败并出现 401/adfs/services/trust/13/windowstransport 异常

转载 作者:行者123 更新时间:2023-12-02 06:02:46 28 4
gpt4 key购买 nike

我尝试在 Azure Windows Server 2016 虚拟机上运行 Java 1.8 Update 192 应用程序,该虚拟机使用 Microsoft SQLServer JDBC 7.2.1.jre8 驱动程序,并使用针对 ActiveDirectory 进行身份验证的用户连接到 SQLServer 托管实例数据库实例并以该用户身份运行应用程序,即使用 Authentication=ActiveDirectoryIntegrated。

我遇到异常:

Caused by: java.util.concurrent.ExecutionException: com.microsoft.aad.adal4j.AuthenticationException: Server returned HTTP response code: 401 for URL : https://xxx/adfs/services/trust/13/windowstransport at com.microsoft.sqlserver.jdbc.SQLServerADAL4JUtils.getSqlFedAuthTokenIntegrated(SQLServerADAL4JUtils.java:113) ... 26 more Caused by: com.microsoft.aad.adal4j.AuthenticationException: Server returned HTTP response code: 401 for URL : https://xxx/adfs/services/trust/13/windowstransport at com.microsoft.sqlserver.jdbc.SQLServerADAL4JUtils.getSqlFedAuthTokenIntegrated(SQLServerADAL4JUtils.java:106) ... 26 more 3119 [main] INFO zzz - Database connection failed: Failed to authenticate the user in Active Directory (Authentication=ActiveDirectoryIntegrated).

我不是 .NET 开发人员,不了解 ActiveDirectory 身份验证配置、Windows 域等。

上面的异常错误消息对我来说没有任何意义。它们是什么意思?

我可以使用经过 SQLServer 身份验证的用户和密码连接到数据库,但要求使用 Authentication=ActiveDirectoryIntegrated。

最佳答案

以下异常表明 ActiveDirectory 身份验证失败。

com.microsoft.aad.adal4j.AuthenticationException: Server returned HTTP response code: 401 for URL : https://xxx/adfs/services/trust/13/windowstransport

关于Java JDBC ActiveDirectoryAuthentication Azure SQLServer 失败并出现 401/adfs/services/trust/13/windowstransport 异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55962337/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com