Data factory Authentication With Azure SQL DB + Managed Identities + Federated Credential

Venkatesh Bandaru 61 Reputation points Microsoft Employee
2024-05-14T04:01:25.8433333+00:00

I am facing ADF Auth issues with Azure SQL DB. ADF is in torus tenant and Azure SQL DB is in Microsoft tenant. Below are the steps i have followed to up FCI.

 

 

Created User Assigned managed identity in Torus tenant.

Created App registration in Torus tenant

Configured FCI on App registration for managed identity.

Created App Service principal in Microsoft tenant

On Microsoft tenant Azure SQL Server , added App service principal in step 4 as Admin.

Created linked service in Torus tenant ADF with sql server Databased and managed identity.

 

Connection is failing here, receiving below error. Can you help here ? It would be great if we could connect for few mins.

 

 

Cannot connect to SQL Database. Please contact SQL server team for further support. Server: 'edtestdblastmile-msft.database.windows.net', Database: 'ED_TESTDB_LastMile', 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., SqlErrorNumber=18456,Class=14,State=235,

 

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,778 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Harishga 4,325 Reputation points Microsoft Vendor
    2024-05-17T10:33:50.2366667+00:00

    Hi @Venkatesh Bandaru

    Azure SQL Database does support federated authentication. This allows you to use Microsoft Entra (formerly Azure Active Directory) credentials from a federated domain for authentication. It’s part of the hybrid identity solutions provided by Microsoft Entra, which also includes cloud authentication, pass-through authentication, and password hash authentication.

    Federated authentication is supported and can be used with SQL Server Management Studio (SSMS) and SQL Server Data Tools (SSDT) for strong authentication, including multifactor authentication options. To support Windows single sign-on credentials, you can use Microsoft Entra credentials from a federated or managed domain that is configured for seamless single sign-on.

    As you received an error message, it's important to ensure that the federated authentication is correctly set up and that the Azure SQL Server is configured to accept tokens from the federated domain. You need to review the trust relationships between the domains and the Azure SQL Database and ensure that the necessary permissions are granted to the managed identity and service principal involved in the configuration.

    Reference
    https://learn.microsoft.com/en-us/azure/azure-sql/database/authentication-aad-overview?view=azuresql#overview
    https://learn.microsoft.com/en-us/azure/data-factory/connector-azure-sql-database?tabs=data-factory#linked-service-properties

    I hope these steps help you resolve the issue. Let me know if you have any further questions

    0 comments No comments