1

I'm using Azure SDK for python in the machine learning env and to create a Workspace instance I'm using the following code.

from azure.identity import DefaultAzureCredential
from azureml.core import Workspace

credential = DefaultAzureCredential()
Workspace.from_config()

How to I know which type of credential Azure is using to authenticate my ML Studio Compute instance? I've read this article that shows that the DefaultAzureCredential class try 5 different types of credential. Yesterday I was having some kind of problems authenticating and I had to enable a Manage Identity in my ML Studio Compute instance and add the manage identity as a contributor in the IAM of the Azure Machine Learning Studio service but today with a new machine I'm having no trouble with the authentication.

In yesterday authentication I had to authenticate using the CLI command

az login --identity --username $DEFAULT_IDENTITY_CLIENT_ID
Jason Aller
  • 3,541
  • 28
  • 38
  • 38
  • 1
    I don't know how to check which one is used but you can see the order that the class is using here: https://learn.microsoft.com/en-us/python/api/azure-identity/azure.identity.defaultazurecredential?view=azure-python And if you would like to use a specific one, you could use the `exclude_`-parameters. It's not the answer to your question but maybe still helpful. :-) – holger Jan 13 '23 at 15:20
  • I was helpfull for sure! Thank you Jason! – Gabriel Padilha Jan 13 '23 at 16:55

0 Answers0