Unable to use Service Principal for Authentication in Azure SQL Server

Jaya Ojha 60 Reputation points
2024-04-03T05:44:05.18+00:00

Hi,

I am trying to connect to the Azure SQL DB under SQL Server using Azure DevOps pipeline. To do so, first I used JDBC URL with SQL Authentication and that worked for me.

Apart from this when I checked for JDBC URLS present under Connection strings in the portal, I got 2 more options:

MS Entra Password Authentication and MS Entra Integrated Authentication

With MS Entra Password Authentication, I started getting error:


Failed to load ADAL4J Java library for performing ActiveDirectoryPassword authentication

To resolve above error, I also downloaded JDBC Driver for this https://learn.microsoft.com/en-us/sql/connect/jdbc/download-microsoft-jdbc-driver-for-sql-server?view=sql-server-ver16

Which didn't too didn't work for me

But then I checked for all the AD authentication https://learn.microsoft.com/en-us/sql/connect/jdbc/connecting-using-azure-active-directory-authentication?view=sql-server-ver15

And then tried with Service Principal Authentication and got below error:


The authentication value "ActiveDirectoryServicePrincipal" is not valid.

I want to use AD only Authentication in SQL Server DB. which is suggested by MS, but I am not able to do so.

Any help will be appreciated!

Azure SQL Database
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,803 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ShaktiSingh-MSFT 15,301 Reputation points
    2024-04-03T06:44:12.7433333+00:00

    Hi Jaya Ojha •,

    Welcome to the MS Q&A platform.

    The query posted by you looks like there is configuration issue at Azure DevOps side which is not supported in the Q&A forum. I would request you post your query in the Azure DevOps forum

    This will assist you with a faster reply to your query.

    Hope this will help.

    Let us know if you face any issue or need help in the Azure SQL Database.

    Thanks

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.