Skip to content

Cannot import name 'AccessTokenInfo' from 'azure.core.credentials' #37491

@miladh

Description

@miladh
  • Package Name: az-ai-ml
  • Package Version: 1.19.0
  • Operating System: Linux
  • Python Version: 3.11

Describe the bug

Note

Apologies if this issue should have been created in a different repository. Please let me know if I should create this ticket elsewhere.

In this PR, the minimum version of azure-core was updated to include the new SupportTokenInfo protocol and AccessTokenInfo class. However, when attempting to install the Azure ML extension using:

az extension add --name ml

the following error occurs:

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

As this issue is currently disrupting our CI pipelines, we would be grateful for any guidance you can provide to help us address it promptly.

Possible Cause

This issue seems to arise because the Azure ML extension installs azure_identity-1.18.0, which relies on AccessTokenInfo from azure.core.credentials. However, azure-cli version 2.64.0 still uses an older version of azure-core (1.28.0), and hence the error above is thrown.

For reference, here’s the azure-cli requirements file.

To Reproduce
Steps to reproduce the behavior:

  1. Install az cli
  2. Run az extension add --name ml

Metadata

Metadata

Assignees

No one assigned

    Labels

    ClientThis issue points to a problem in the data-plane of the library.Machine LearningService AttentionWorkflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.issue-addressedWorkflow: The Azure SDK team believes it to be addressed and ready to close.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions