Medium severitydata source
Power BI Refresh Error:
DF-SQLDW-InternalErrorUsingMSI
What does this error mean?
ADF failed to authenticate to Synapse Analytics using managed identity. The ADF instance or data flow cluster could not obtain a token or was rejected by Synapse.
Common causes
- 1The ADF managed identity has not been added as a user in the Synapse dedicated SQL pool database
- 2The ADF managed identity has the correct Azure role (Contributor) on the Synapse workspace but is missing the SQL-level database user
- 3A transient Azure AD token issuance issue caused a one-time failure
- 4The Synapse workspace was configured for SQL authentication only and does not allow managed identity connections
How to fix it
- 1In the Azure portal, open the Synapse workspace and go to Synapse Studio > Manage > SQL pools.
- 2Connect to the dedicated SQL pool using a SQL admin account and run: CREATE USER [<adf-instance-name>] FROM EXTERNAL PROVIDER; ALTER ROLE db_datareader ADD MEMBER [<adf-instance-name>]; ALTER ROLE db_datawriter ADD MEMBER [<adf-instance-name>];.
- 3Replace <adf-instance-name> with the exact name of the ADF instance as shown in the Azure portal under the ADF resource overview (not the resource group name).
- 4Verify the ADF managed identity also has the 'Storage Blob Data Contributor' role on the Synapse workspace's ADLS Gen2 storage account if using PolyBase staging.
- 5After adding the database user, re-run Test connection on the linked service to confirm MSI auth works, then retry the pipeline.
Frequently asked questions
Official documentation: https://learn.microsoft.com/en-us/azure/data-factory/data-flow-troubleshoot-guide