question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Could not authenticate via Azure Directory Interactive with MFA

See original GitHub issue

I 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:closed
  • Created a year ago
  • Reactions:2
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
Avery-Dunncommented, May 6, 2022

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.

3reactions
Avery-Dunncommented, Jun 30, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to authenticate your credentials error when you ...
Describes an issue that triggers an Unable to authenticate your credentials. Make sure that your user name is in the format @ error....
Read more >
Authentication error while connection to an Azure SQL ...
Authentication error while connection to an Azure SQL Database using Azure Active Directory Interactive with MFA · 1. Create a new Azure SQL...
Read more >
Azure AD authentication troubleshooting: Known problems ...
To reduce the number of times you have to sign in to Microsoft products an identity token, refresh token or browser cookie may...
Read more >
Connect to Azure SQL in Python with MFA Active Directory ...
ODBC driver support the MFA authentication, but windows only: enter image description here. I tested in Python pyodbc and it also works.
Read more >
Configure RDM Active Directory Interactive (with MFA)
Settings · 1.Select Active Directory Interactive (with MFA Support) from the Login mode dropdown menu. · 2.In the Username field, paste the Active...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found