Could not authenticate via Azure Directory Interactive with MFA
See original GitHub issueI want to login to an Azure SQL Server managed instance via Azure Directory Interactive. The account has MFA via Microsoft Authenticator enabled. The login screen (https://uniper-onmicrosoft-com.access.mcas.ms/aad_login) is displayed and I enter my credentials and approve them with the Microsoft authenticator app. After a while i get the response:
The specified database user/password combination is rejected: Fehler beim Authentifizieren des Benutzers "xxx@yyy" in Active Directory (Authentication=ActiveDirectoryInteractive). No Authorization code was returned from the server
I’m using Jetbrains DataGrip and am in contact with their support for a while. We have tried many different configuration settings but nothing worked. At least we checked the connection with a simple Java program with no other dependencies. The support guy at Jetbrains could not find any reason for the issue in DataGrip and now guess that there is a problem in the authentication library.
With Sql Server Management Studio login works fine.
I didn’t find something related here. Does anyone have an idea why this occurs?
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:14 (6 by maintainers)
Top GitHub Comments
Thanks everyone for the information about the issue/workaround involving language settings. We’re working on figuring out exactly where the root cause of the issue is (in MSAL, JDBC, SQL Server, etc.) and I’ll update this thread once we have more info.
Just an update for anyone experiencing this issue: as shown through some investigation in https://github.com/microsoft/mssql-jdbc/issues/1839, part of this problem was in the way MSAL Java handle responses, where some information was being dropped due to localization. This issue was fixed in https://github.com/AzureAD/microsoft-authentication-library-for-java/pull/511 and is in the version 1.13 release, so updating to 1.13 should fix this system language problem.