How to connect to Azure SQL Managed Instance in SSIS using a user-assigned managed identity from an Azure Data Factory pipeline

Danny Looby 0 Reputation points
2023-05-10T19:28:56.3533333+00:00

Greetings,

I'm trying to connect to an Azure SQL Managed Instance in SSIS using a user-assigned managed identity called from a pipeline in Azure Data Factory. Inside my pipeline, I'm using an SSIS package activity to call my SSIS package. I have followed the steps outlined in the link below, but I haven't had any success.

https://learn.microsoft.com/en-us/sql/integration-services/connection-manager/ole-db-connection-manager?view=sql-server-ver16#managed-identities-for-azure-resources-authentication

The error I receive is as follows:

Execute SQL Task:Error: Failed to acquire connection "my connection"D". Connection may not be configured correctly or you may not have the right permissions on this connection.

I tried to enter connection properties inside the "Property Overrides" of the Execute SSIS package activity by setting

\Package.Connections[{the name of your connection manager}].Properties[ConnectUsingManagedIdentity] to true and setting

\Package.Connections[{the name of your connection manager}].Properties[UserName] to the name of the user-assigned managed identity.

I added a script task inside my SSIS package to log the the connection string using Dts.Events.FireInformation. But the connection string that was set during the creation doesn't appear to be changing.

Here are some ideas I have kicked around. I am limited on what I can do so I have not yet attempted the options below. Hoping someone could shed some light on this issue before I move forward so that I can pull in resources from our DevOps team to help.

  • Could this have anything to do with how the SSIS integration runtime was setup? The option to use user-assigned managed identity for data factory was not selected during initial setup. Wondering if this could be causing the issue...

User's image

  • Does the user-assigned managed identity have to be in the same resource group as the SQL Managed Instance?

Any suggestions would be great! Thank you.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,623 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.