Azure-storage-azcopy: azcopy ls is not showing blobs in container

Created on 13 Nov 2018  路  2Comments  路  Source: Azure/azure-storage-azcopy

I see this on Linux and OSX.

[admin@ip-0A05000B ~]$ azcopy --version
azcopy version 10.0.4-Preview
[admin@ip-0A05000B ~]$ azcopy login
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code BLC4LFLT9 to authenticate.
Login succeeded.

[admin@ip-0A05000B ~]$ azcopy ls "https://requawestus2.blob.core.windows.net/cyclecloud"
List is using OAuth token for authentication.

cannot list blobs for download. Failed with error -> github.com/Azure/azure-storage-azcopy/vendor/github.com/Azure/azure-storage-blob-go/azblob.NewResponseError, /go/src/github.com/Azure/azure-storage-azcopy/vendor/github.com/Azure/azure-storage-blob-go/azblob/zz_generated_response_error.go:28
===== RESPONSE ERROR (ServiceCode=AuthorizationPermissionMismatch) =====
Description=This request is not authorized to perform this operation using this permission.
RequestId:62af0922-301e-0085-2004-7b7e29000000
Time:2018-11-13T03:54:05.3116844Z, Details: 
   Code: AuthorizationPermissionMismatch
   GET https://requawestus2.blob.core.windows.net/cyclecloud?comp=list&restype=container&timeout=901
   Authorization: REDACTED
   User-Agent: [AzCopy/10.0.4-Preview Azure-Storage/0.3 (go1.10.3; linux)]
   X-Ms-Client-Request-Id: [99b8342d-573d-47a7-6e15-34888aa24380]
   X-Ms-Version: [2018-03-28]
   --------------------------------------------------------------------------------
   RESPONSE Status: 403 This request is not authorized to perform this operation using this permission.
   Content-Length: [279]
   Content-Type: [application/xml]
   Date: [Tue, 13 Nov 2018 03:54:05 GMT]
   Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
   X-Ms-Error-Code: [AuthorizationPermissionMismatch]
   X-Ms-Request-Id: [62af0922-301e-0085-2004-7b7e29000000]
   X-Ms-Version: [2018-03-28]

This is a complete reproduction after install on OSX and linux. There are no other options on the ls command - such as saskey for auth.

Most helpful comment

The "Storage Blob Data Contributor" role is required even if you already have "Owner" or "Contributor" roles.

All 2 comments

Closing this as it was fixed per the e-mail conversation. This error happens when the user does not have access to the data plane. One needs to be part of the 'Storage Blob Data Contributor' role to have this access.

The "Storage Blob Data Contributor" role is required even if you already have "Owner" or "Contributor" roles.

Was this page helpful?
0 / 5 - 0 ratings