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