MetricSign
EN|NLRequest Access
High severityconfiguration

Power BI Refresh Error:
SECRET_SCOPE_NOT_FOUND

What does this error mean?

A notebook or job referenced a Databricks secret scope that does not exist in the workspace, causing credential lookups to fail before any computation begins.

Common causes

  • 1The scope name in the code does not match any scope in the workspace
  • 2The scope was created in a different Databricks workspace (e.g., staging vs production)
  • 3A workspace migration was performed but secret scopes were not recreated in the target workspace
  • 4The scope name contains uppercase letters or special characters not preserved during migration

How to fix it

  1. 1Step 1: List all existing scopes in the workspace: databricks secrets list-scopes.
  2. 2Step 2: Confirm the scope name in the job or notebook matches exactly — scope names are case-sensitive.
  3. 3Step 3: Create the missing scope using the Databricks CLI or REST API, then add the required secrets.
  4. 4Step 4: For Azure Key Vault-backed scopes, recreate the scope linked to the correct Key Vault DNS name and resource ID.
  5. 5Step 5: Update CI/CD pipelines to include secret scope creation as part of workspace provisioning.

Frequently asked questions

Do secret scopes transfer automatically during workspace cloning?

No — Databricks secret scopes are not included in workspace export/import. They must be recreated manually or via infrastructure-as-code (Terraform, Databricks CLI scripts) in the new workspace.

Can a secret scope be shared between multiple Databricks workspaces?

Not directly. For cross-workspace credential sharing, use Azure Key Vault-backed scopes that reference the same Key Vault, or provision identical scopes in each workspace via automation.

Other configuration errors