pop up when using databrics sql
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2025 07:07 AM
Hello,
I am uning databricks sql to read from a unity catalog table locally on a python project using an azure sp client id and client secret
the connexion is successful however i have a pop up that asks me to connect to my azure env
is there a way to make this connexion without the pop up since we go through a client secret and a client id ?
this is my code
thank you !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2025 05:34 AM
In your .env file, add:
DATABRICKS_WORKSPACE_RESOURCE_ID=/subscriptions/your-sub-id/resourceGroups/your-rg/providers/Microsoft.Databricks/workspaces/your
-workspace
Alternative approaches if the popup persists:
1. Use OAuth machine-to-machine (M2M) authentication (recommended for newer workspaces):
auth_type="databricks-oauth"
2. Ensure your service principal has proper permissions:
- The SP needs to be added as a user in your Databricks workspace
- Grant it appropriate permissions on Unity Catalog
3. Try setting environment variable to disable browser-based auth:
os.environ["DATABRICKS_AUTH_TYPE"] = "azure-client-secret"
Let me know if the popup still appears after these changes!