Thank you for posting your query on Microsoft Q&A, the above shared indicates that the DefaultAzureCredential object was unable to obtain a valid authentication token from any of the available credential sources.
From above error it seems that the EnvironmentCredential
object was unable to obtain a valid authentication token from the environment variables.
EnvironmentCredential: EnvironmentCredential authentication unavailable. Environment variables are not fully configured.
Kindly validate the following:
Ensure the appropriate environment variables are set prior to application startup for the intended authentication method and this has appropriate permissions assigned.
- To authenticate a service principal using a client secret, ensure the variables
AZURE_CLIENT_ID
,AZURE_TENANT_ID
andAZURE_CLIENT_SECRET
are properly set. - To authenticate a service principal using a certificate, ensure the variables
AZURE_CLIENT_ID
,AZURE_TENANT_ID
,AZURE_CLIENT_CERTIFICATE_PATH
, and optionallyAZURE_CLIENT_CERTIFICATE_PASSWORD
are properly set. - To authenticate a user using a password, ensure the variables
AZURE_USERNAME
andAZURE_PASSWORD
are properly set
Still if this does not work then, Please install developer CLI, once installed, authenticate to your Azure account using 'azd auth login', this will get the access token from AzureDeveloperCliCredential.
Please do let me know if you have any further queries.
Thanks,
Akshay Kaushik
Please "Accept the answer" (Yes), and share your feedback if the suggestion answers you’re your query. This will help us and others in the community as well.