![]() ![]() You can get the subscription ID for an Azure Databricks workspace by clicking Azure Portal in the workspace navigation bar and looking for Resource ID: /subscriptions/00000000-0000-0000-0000-000000000000, where 00000000-0000-0000-0000-000000000000 is the subscription ID. If you need to switch to a different subscription, run the az account set command, using the -name or -subscription option to specify the correct subscription name or ID. Or, try running the az databricks workspace list command later in this step. If you are not sure what the correct subscription should be, see Get subscription and tenant IDs in the Azure portal. ![]() The subscription’s Name indicates the current subscription. To do this, in the output of the az login command, look for the table row where IsDefault is set to True. az login \Ĭonfirm that you are signed in to the correct subscription for which you want to create the Azure AD access token for the signed-in Azure AD service principal. Use the -output option to display the command’s output in a different format (in this case, a table instead of JSON) for better readability. Use the -service-principal option along with specifying the values for the parameters of Tenant ID ( Directory (tenant) ID), Client ID ( Application (client) ID), and Client secret ( Value) for the application registered in Azure AD. Sign in to Azure by using the Azure CLI to run the az login command. To access the Databricks REST API with the service principal, you get and then use an Azure AD access token for the service principal. This section describes how to manually get an Azure AD token for a service principal by using the Azure CLI. ![]() Get an Azure AD access token with the Azure CLI The Azure AD access token is in the access_token value within the output of the call. It represents the programmatic ID for Azure Databricks ( 2ff814a6-3304-4ab8-85cb-cd0e6f879c1d) along with the default scope ( /.default, URL-encoded as /.default).įor example: curl -X POST -H 'Content-Type: application/x-www-form-urlencoded' \
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |