How to troubleshoot creating service principal?

Ryan Tay 5 Reputation points
2025-01-14T06:11:02.5133333+00:00

I'm trying to use the Ingest feature in Data Factory and I'm on the "Source data store" step so I'm trying to establish the connection with the DB. The first code block is the error details after testing the connection for the error code: SqlFailedToConnect.
https://youtu.be/sge9qTf8GdY?si=QOFiYiCVDBY9JudO&t=225
I was following the above tutorial (timestamp included) and he says to create the service principal for the application which I tried in Data Studios. The second code block is the error I get after running the SQL code he showed. This is the issue I'm having and I'm assuming that it's something to do with permissions but I already have "Azure Active Directory (Azure AD) is now Microsoft Entra ID." on my server. Do I have to play with the SQL Server's IAM for the Service Principal or the ADF? I'm not sure.

Cannot connect to SQL Database. Please contact SQL server team for further support. Server: '____server.database.windows.net', Database: '____db', User: ''. Check the linked service configuration is correct, and make sure the SQL Database firewall allows the integration runtime to access. Login failed for user '<token-identified principal>'. The server is not currently configured to accept this token.

Msg 33159, Level 16, State 1, Line 1 Principal '___-adf' could not be created. Only connections established with Active Directory accounts can create other Active Directory users. Msg 15151, Level 16, State 1, Line 2 Cannot add the principal '____-adf', because it does not exist or you do not have permission.
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,107 questions
Azure Data Studio
Azure Data Studio
A cross-platform database tool for data professionals using on-premises and cloud data platforms on Windows, macOS, and Linux.
128 questions
{count} votes

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.