Skip to content

Azure blob client fails with authz error while same operation is allowed via CLI #13826

@inc0

Description

@inc0
  • Package Name: azure-storage-blob
  • Package Version: 12.5.0
  • Operating System: MacOS
  • Python Version: 3.8

Describe the bug
This command:
az storage blob list --container-name mycontainername --account-name myaccount works and returns list of blobs
in python:
ContainerClient(account_url="myaccount.blob.core.windows.net", container_name="mycontainername", credential=AzureCliCredential()).list_blobs()

Throws:

HttpResponseError: This request is not authorized to perform this operation using this permission.
RequestId:4d936591-701e-0031-078a-8c01ed000000
Time:2020-09-17T00:34:09.6826796Z
ErrorCode:AuthorizationPermissionMismatch
Error:None

Expected behavior
Either python returning correct response or useful error message to pinpoint what's wrong.

Metadata

Metadata

Assignees

Labels

Service AttentionWorkflow: This issue is responsible by Azure service team.StorageStorage Service (Queues, Blobs, Files)customer-reportedIssues that are reported by GitHub users external to the Azure organization.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