A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://learn.microsoft.com/azure/databricks/dev-tools/api/latest/aad/user-aad-token below:

Get Microsoft Entra ID tokens for users by using the Azure CLI - Azure Databricks

Get Microsoft Entra ID tokens for users by using the Azure CLI

In this article

Important

This article describes how to manually create Microsoft Entra ID tokens for users by using the Azure CLI.

Databricks does not recommend that you create Microsoft Entra ID tokens for Azure Databricks users manually. This is because each Microsoft Entra ID token is short-lived, typically expiring within one hour. After this time, you must manually generate a replacement Microsoft Entra ID token. Instead, use one of the participating tools or SDKs that implement the Databricks client unified authentication standard. These tools and SDKs automatically generate and replace expired Microsoft Entra ID tokens for you, leveraging Azure CLI authentication.

You can use the Azure CLI to get Microsoft Entra ID access tokens for users.

  1. Get the correct Azure subscription ID for your user account, if you do not already know this ID, by doing one of the following:

  2. After you have the correct Azure subscription ID for your user account, begin signing in to Azure by using the Azure CLI to run the az login command. After you run this command, follow the on-screen instructions to finish signing in with your account.

    az login
    
  3. Confirm that you are signed in to the correct subscription for your signed-in user. To do this, run the az account set command, using the -s or --subscription option to specify the correct subscription ID.

    az account set -s <subscription-id>
    
  4. Generate your Microsoft Entra ID access token by running the az account get-access-token command. Use the --resource option to specify the unique resource ID for the Azure Databricks service, which is 2ff814a6-3304-4ab8-85cb-cd0e6f879c1d. You can display just the Microsoft Entra ID token's value in the output of the command by using the --query and -o or --output options.

    az account get-access-token \
    --resource 2ff814a6-3304-4ab8-85cb-cd0e6f879c1d \
    --query "accessToken" \
    -o tsv
    

Additional resources

In this article

Was this page helpful?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4