'ImportError: cannot import name 'AccessTokenInfo' from 'azure.core.credentials'

Farzane Yahyanejad 0 Reputation points Microsoft Employee
2025-02-06T17:26:50.4366667+00:00

I'm trying to execute python script using this tutorial https://learn.microsoft.com/en-us/azure/machine-learning/component-reference/execute-python-script?view=azureml-api-2&viewFallbackFrom=azureml-api-1
but I keep receiving

azureml_main: 'ImportError: cannot import name 'AccessTokenInfo' from 'azure.core.credentials'

I checked and I am using azure-core-1.32.0, which it should have 'AccessTokenInfo', but I keep receiving this!

This error happens when I import "from azure.keyvault.secrets import SecretClient"

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
3,106 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.