Skip to content

Instantly share code, notes, and snippets.

@cbattlegear
Created October 28, 2022 21:01
Show Gist options
  • Save cbattlegear/5b5c6bace7aa85fc76036b68b1807b22 to your computer and use it in GitHub Desktop.
Save cbattlegear/5b5c6bace7aa85fc76036b68b1807b22 to your computer and use it in GitHub Desktop.
export client_id="YourUserManagedIdentityClientIdGUID"
export DATABRICKS_AAD_TOKEN=$(curl "http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=2ff814a6-3304-4ab8-85cb-cd0e6f879c1d&client_id=$client_id" -H Metadata:true -s | jq -r '.access_token')
databricks configure --aad-token # or you can use the DATABRICKS_AAD_TOKEN env var anywhere else you need to auth!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment