How do I connect to Azure SQL DB with AD password using JDBC configuration from Spring boot without multifactor authentication?

Savio Vegnesa 56 Reputation points
2022-09-09T05:28:17.803+00:00

How do I connect to Azure SQL DB with AD password using JDBC configuration from Spring boot

I tried following steps from:
https://learn.microsoft.com/en-us/azure/developer/java/spring-framework/configure-spring-data-jdbc-with-azure-sql-server

But encountered this error

AADSTS50076: Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access

Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
16,652 questions
Azure SQL Database
{count} votes

1 answer

Sort by: Most helpful
  1. Shweta Mathur 19,946 Reputation points Microsoft Employee
    2022-09-13T11:15:41.403+00:00

    Hi @Savio Vegnesa ,

    Thanks for reaching out and apologies for delay in response.

    The error is due to default security measures has been configured in your Azure AD tenant which is looking multi-factor authentication to connect to Azure SQL DB.

    You can disable the security default which is enabled by default in your tenants for now by using

    240536-image.png

    Reference:
    https://learn.microsoft.com/en-us/azure/active-directory/fundamentals/concept-fundamentals-security-defaults

    It is not recommended to disable default for security reasons.

    Hope this will help.

    Thanks,
    Shweta

    --------------------------------

    Please remember to "Accept Answer" if answer helped you.