Short answer: a managed identity is an identity in Microsoft Entra ID that Azure creates and looks after for a resource, such as a data factory. The resource signs in as itself, so there is no password or key to store, rotate or leak. You give the identity a role on the storage account, a user in the database or access to Key Vault, and the linked service uses it.
Every key in a connection string is a secret someone can copy. A managed identity removes the secret: Azure hands the factory a short-lived token whenever it needs one.
System-assigned or user-assigned?
- created with the resource and deleted with it
- one per resource
- a data factory has one, named like the factory
- a resource of its own
- several services can share it
- survives when a service is deleted
For one data factory, the system-assigned identity is simplest. A user-assigned identity helps when several services need the same access, or when the access must be granted before the service exists.
How does the factory get access?
- 1Data factorysigns in as its managed identity
- 2Storagea role such as Storage Blob Data Contributor
- 3Azure SQLa database user made from the identity
- 4Key Vaulta role such as Key Vault Secrets User
In Azure SQL Database, an Entra admin creates a user for the factory and gives it roles:
CREATE USER [adf-sales-prod] FROM EXTERNAL PROVIDER;
ALTER ROLE db_datareader ADD MEMBER [adf-sales-prod];
ALTER ROLE db_datawriter ADD MEMBER [adf-sales-prod];The linked service then names no password: its authentication type is System-assigned managed identity.
What goes wrong?
- The role is granted on the wrong level. Owner or Contributor on a storage account manages the account but does not read the data. Data access needs a Storage Blob Data role.
- The role takes a while. A new role assignment can take a few minutes to apply. A test right after granting can fail and then pass.
- Too much access. Give the identity the narrowest role on the narrowest scope: a container, not the subscription.
- Development and production share one identity. Each factory has its own; grant each one only its own environment.
Where can you check this?
- Microsoft Learn: What are managed identities for Azure resources?
- Microsoft Learn: Managed identity for Azure Data Factory
- Microsoft Learn: Copy data to and from Azure SQL Database (managed identity authentication)
Where do you start?
Release Data Factory pipelines like code keeps the remaining secrets in Key Vault, and the open course Upserts into Azure SQL loads a database the factory can sign in to this way.