Skip to content

AuthorizationPermissionMismatch when downloading model with azure cli credentials #37546

@GK-Matias

Description

@GK-Matias
  • Package Name: azure-ai-ml
  • Package Version: 1.19.0
  • Operating System: Ubuntu
  • Python Version: 3.11.6

Describe the bug
prior to version 1.19.0 it was possible to download a model when authenticated with the azure cli credentials but from 1.19.0 and onwards, the following error message appeares:

azure.core.exceptions.HttpResponseError: Operation returned an invalid status 'This request is not authorized to perform this operation using this permission.'
ErrorCode:AuthorizationPermissionMismatch

To Reproduce
Steps to reproduce the behavior:

  1. az login
  2. Run this code:
from azure.ai.ml import MLClient
from azure.identity import AzureCliCredential

token = AzureCliCredential()

ml_client = MLClient(token, "<id>",  "<rg_name>", "<mlw_name>")

ml_client.models.download(
    name="<model_name>", version="<model_version>", download_path="<path>"
)

Expected behavior
Expect it to be possible to download the model with the cli credentials.

Additional context
Using azure-identity version 1.18.0

Metadata

Metadata

Assignees

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.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions