MetricSign
Start free
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.

Beyond the docs

Common practitioner solutions not covered in the official documentation.

  1. 1Verify permissions at the table level if row or object-level security is in use
  2. 2Test the login manually in SSMS with the same credentials to confirm access works

Frequently asked questions

Does this error affect all users or just the dataset owner?

All users — scheduled and manual refreshes run under the credentials stored in the dataset settings, not individual user accounts.

Can expired OAuth tokens cause this error?

Yes — if the data source uses OAuth (SharePoint, Dynamics 365, Azure), the token expires periodically and must be re-authorized by the dataset owner.

Will this error clear itself after I update the credentials?

Yes — once you re-enter valid credentials in the dataset settings, the next refresh (scheduled or triggered manually) will succeed.

How do I know which dataset is using which credentials?

Go to Power BI Service → Settings → Datasets → Data source credentials for the affected dataset. Each connection shows the credential type and the account it's stored under.

Source · learn.microsoft.com/en-us/fabric/data-factory/connector-troubleshoot-synapse-sql

Other credentials errors