Skip to content

Commit

Permalink
Use all-apis scope with external-browser (#563)
Browse files Browse the repository at this point in the history
## Changes
For all OAuth flows, we pretty much only support the `all-apis` scope
now. This fixes `external-browser` credentials provider to use this
scope, as the other scopes there do not work.

## Tests
Ran the local_browser_oauth.py example, which worked.

- [ ] `make test` run locally
- [ ] `make fmt` applied
- [ ] relevant integration tests applied
  • Loading branch information
mgyucht authored Feb 23, 2024
1 parent 2a91e8d commit 5255760
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion databricks/sdk/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def noop_credentials(_: any):

config = Config(host=host, credentials_provider=noop_credentials)
if not scopes:
scopes = ['offline_access', 'clusters', 'sql']
scopes = ['all-apis']
if config.is_azure:
# Azure AD only supports full access to Azure Databricks.
scopes = [f'{config.effective_azure_login_app_id}/user_impersonation', 'offline_access']
Expand Down

0 comments on commit 5255760

Please sign in to comment.