MetricSign
Request Access
High severitycredentials

Power BI Refresh Error:
SqlUnauthorizedAccess

What does this error mean?

The identity used by ADF or Fabric was denied SQL database access. The login exists but lacks the required permissions on the target database.

Common causes

  • 1The SQL login does not have db_datareader or db_datawriter role on the target database
  • 2The managed identity of the Azure Data Factory is not mapped to a SQL database user
  • 3The service principal is not added as an external user to the Azure SQL/Synapse database
  • 4Row-level security or object-level permissions deny access to the specific table
  • 5The login is a server-level login but has no database-level permissions

How to fix it

  1. 1Grant the necessary SQL permissions: GRANT SELECT ON SCHEMA::dbo TO [user] (or db_datareader role)
  2. 2For managed identity: CREATE USER [<ADF name>] FROM EXTERNAL PROVIDER; then grant roles
  3. 3For service principal: add as external user — CREATE USER [<app name>] FROM EXTERNAL PROVIDER
  4. 4Verify permissions at the table level if row or object-level security is in use
  5. 5Test the login manually in SSMS with the same credentials to confirm access works

Other credentials errors