Contents

Azure Machine Learning Workspace Authentication Troubleshooting Guide

Contents

Could you try using config.json file connect to your Azure ML Workspace first? The steps you can following at the below.

  1. Go to https://portal.azure.com/
  2. Download config.json
  3. config.json
  4. Story config.json to the same directory as your Python code.
  5. run python code at the below
1
2
3
from azureml.core import Workspace
ws = Workspace.from_config()
print("Found workspace {} at location {}".format(ws.name, ws.location))

  If using config.json file connect to your Azure ML Workspace does not work, please check your SDK version and update your SDK.

Check SDK version python code:

1
2
3
import azureml.core

print(azureml.core.VERSION)

Update SDK version - Upgrade a previous version, make sure you upgrade all the dependencies as well:

1
pip install --upgrade --upgrade-strategy eager azureml-sdk

If Interactive Authentication does not work, please using Azure CLI Authentication or Service Principal Authentication. Details at the below.

https://notebooks.azure.com/azureml/projects/azureml-getting-started/html/how-to-use-azureml/manage-azureml-service/authentication-in-azureml/authentication-in-azure-ml.ipynb