Azure / azure-sdk-for-python

This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
MIT License
4.63k stars 2.84k forks source link

AuthorizationPermissionMismatch when downloading model with azure cli credentials #37546

Open GK-Matias opened 2 months ago

GK-Matias commented 2 months ago

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, "", "", "")

ml_client.models.download( name="", version="", download_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
github-actions[bot] commented 2 months ago

Thank you for your feedback. Tagging and routing to the team member best able to assist.

github-actions[bot] commented 2 months ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/azure-ml-sdk @azureml-github.

FilBr commented 2 weeks ago

I'm having the same issue with

Package Name: azure-ai-ml Package Version: 1.22.0 Operating System: Ubuntu Python Version: 3.10.13

any updates?

giorgiococci commented 1 week ago

I'm facing the same error, now both with Python SDK and with AZ CLI (az ml model download, version 2.31.0 ). Any update on this??