cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Job is failing with exception ClientAuthenticationError: DefaultAzureCredential failed to retrieve a token from the included credentials.

Mohit_m
Valued Contributor II

ClientAuthenticationError: DefaultAzureCredential failed to retrieve a token from the included credentials.

Attempted credentials:

EnvironmentCredential: EnvironmentCredential authentication unavailable. Environment variables are not fully configured.

Visit https://aka.ms/azsdk/python/identity/environmentcredential/troubleshoot to troubleshoot.this issue.

ManagedIdentityCredential: ManagedIdentityCredential authentication unavailable. The requested identity has not been assigned to this resource.

SharedTokenCacheCredential: SharedTokenCacheCredential authentication unavailable. No accounts were found in the cache.

VisualStudioCodeCredential: Failed to get Azure user details from Visual Studio Code.

1 ACCEPTED SOLUTION

Accepted Solutions

Mohit_m
Valued Contributor II

Below docs are for reference:

https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/identity/azure-identity/migration_guide....

there was a suggestion given to use

from azure.common.credentials import ServicePrincipalCredentials

instead of

from azure.identity import ClientSecretCredential

Also, please check if you have used the env variables for the authentication, sometimes you set it via init script so please check if the init script is in place

found out an init script was missing, the one setting the env variables for the authentication

View solution in original post

1 REPLY 1

Mohit_m
Valued Contributor II

Below docs are for reference:

https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/identity/azure-identity/migration_guide....

there was a suggestion given to use

from azure.common.credentials import ServicePrincipalCredentials

instead of

from azure.identity import ClientSecretCredential

Also, please check if you have used the env variables for the authentication, sometimes you set it via init script so please check if the init script is in place

found out an init script was missing, the one setting the env variables for the authentication

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group