Hi, and thank you in advanced for your help. I am new to Azure and been stuck with this all day. I am working in VSCode, with the pertinent extensions for Azure (they all seem to work fine as I can authenticate/login in them and see all the resources).
I am using Python SDK v2, and Azure CLI version 2.65. I am using a Conda environment with all the libraries installed.
I can't get rid of this error I get when I try to create an MLClient and authenticate into the workspace in order to access the jobs in Azure Machine Learning and download a model.
from azure.identity import DefaultAzureCredential
from azure.ai.ml import MLClient
# Create an MLClient instance
ml_client = MLClient(
DefaultAzureCredential(),
subscription_id,
resource_group,
workspace_name
I have already installed the Azure Extensions, and Authenticate via the Azure Developer CLI, everything looks fine until I run:
(
)
automl_job = ml_client.jobs.get(name=job_name)
I get this error:
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, no response from the IMDS endpoint. SharedTokenCacheCredential: SharedTokenCacheCredential authentication unavailable. No accounts were found in the cache. AzureCliCredential: Azure CLI not found on path AzurePowerShellCredential: Az.Account module >= 2.2.0 is not installed AzureDeveloperCliCredential: Azure Developer CLI could not be found. Please visit
https://aka.ms/azure-dev
for installation instructions and then,once installed, authenticate to your Azure account using 'azd auth login'. To mitigate this issue, please refer to the troubleshooting guidelines here at
https://aka.ms/azsdk/python/identity/defaultazurecredential/troubleshoot
.