Databricks CLI configure (using AAD-TOKEN) in the Databricks notebook `%sh` mode

juned
New Contributor III

Hello everyone, I am trying to setup Databricks CLI by referring to the Databricks CLI documentation. When I setup using the Personal Access Token, it works fine and I am able to access the workspace and fetch the results from the same workspace in Databricks notebook %sh mode.

 

But when I try to configure using AAD-TOKEN, it shows me the below message -

image 

I have the AAD TOKEN value and I tried to add it to the env variable using the below command -

%sh

export DATABRICKS_AAD_TOKEN=<token_value>

 

But for some reason it doesn't show up in the env variable file.

 

Am I missing here something?

 

The Databricks documentation also doesn't provide much information on how to configure Databricks CLI using AAD-TOKEN. Is this correct way?