I have a “client ID” and a “client secret” for OAuth to get an access token for Databricks. I tested the credentials with curl, it works.
But when I fill out the UI fields in the “Databricks data source” in Grafana, I get an error:
oauth2: "invalid_request" "AADSTS90014: The required field 'scope' is missing from the credential.
I also have the value for “scope”; but the UI does not offer a field for the scope to type in.
How can I solve this?
What does the curl command look like?
The curl command looks like this:
curl -X POST -H 'Content-Type: application/x-www-form-urlencoded' \
https://login.microsoftonline.com/123456789/oauth2/v2.0/token \
-d 'client_id=1234567890' \
-d 'grant_type=client_credentials' \
-d 'scope=1234567890.default' \
-d 'client_secret=12345678'
And the response looks like this:
{"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"eyabcdefg"}
Ok, the newest version of the databricks plugin 1.3.4 contains the scope field. It works now!
Small helpful hint: The curl command may contain an escaped “/
” character in the form of “%2F
”.
The input field in Grafana needs the backslash, so 123bc/.default" instead of “123bc%2F.default”