Connection errors when connecting locally from VSC to Azure ML via MLflow tracking server

G. Rietbroek 0 Reputation points

I'm experiencing problems when following the basic instructions from Azure ML docs to work locally on Python notebooks and track them in Azure ML via MLflow.

I'm using a conda environment, it's activated and used as kernel in VSC.

All modules from the docs are installed.

I also have the config.json file in the same folder as the notebook.

Azure ML standard workspace is selected in VSC (I think authentication is also okay, because i can see the whole menu tree from Azure ML in VSC)

I'm on a Mac

When running the follow code:

from import MLClient

from azure.identity import DefaultAzureCredential

ml_client = MLClient.from_config(credential=DefaultAzureCredential())

mlflow_tracking_uri = ml_client.workspaces.get(ml_client.workspace_name).mlflow_tracking_uri

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 to troubleshoot.this issue.

And further on:

Content: {"error":"invalid_grant","error_description":"AADSTS700082: The refresh token has expired due to inactivity. The token was issued on 2020-10-29T05:28:47.8757835Z and was inactive for 90.00:00:00.\r\nTrace ID: 3f2221fa-0d29-4934-893e-72c565a44a00\r\nCorrelation ID: dc908d2c-927e-4c55-a605-8e36bfcd0467\r\nTimestamp: 2023-05-08 14:41:48Z","error_codes":[700082],"timestamp":"2023-05-08 14:41:48Z","trace_id":"3f2221fa-0d29-4934-893e-72c565a44a00","correlation_id":"dc908d2c-927e-4c55-a605-8e36bfcd0467","error_uri":""} To mitigate this issue, please refer to the troubleshooting guidelines here at

Thereafter I just set the tracking URI by copying it from the workspace. Then when running:

mlflow_tracking_uri = 'azureml://'

import mlflow



I get this error:

UnsupportedModelRegistryStoreURIException: Model registry functionality is unavailable; got unsupported URI 'azureml://' for model registry data storage. Supported URI schemes are: ['', 'file', 'databricks', 'databricks-uc', 'http', 'https', 'postgresql', 'mysql', 'sqlite', 'mssql']. See for how to run an MLflow server against one of the supported backend storage locations.

Why is the standard code not working? I really have no clue what's wrong here. Does anybody experienced the same or knows how to solve this issue?

Many thanks for the person(s) who can help me!:)

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
2,667 questions
{count} votes