-
Notifications
You must be signed in to change notification settings - Fork 3.4k
az storage file list undocumented action change in 2.79 #32543
Copy link
Copy link
Closed
Labels
Auto-AssignAuto assign by botAuto assign by botAuto-ResolveAuto resolve by botAuto resolve by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamBreaking ChangePossible-SolutionSimilar-IssueStorageaz storageaz storagecustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues 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 thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Metadata
Metadata
Labels
Auto-AssignAuto assign by botAuto assign by botAuto-ResolveAuto resolve by botAuto resolve by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamBreaking ChangePossible-SolutionSimilar-IssueStorageaz storageaz storagecustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues 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 thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Type
Fields
Give feedbackNo fields configured for issues without a type.
Describe the bug
In Az CLI version 2.78 and below, running "az storage file list" only called the action: "Microsoft.Storage/storageAccounts/fileServices/fileShares/files/read", which is the allowed DataActions of the following Azure RBAC roles:
Storage File Data Privileged Contributor: https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles/storage#storage-file-data-privileged-contributor
Storage File Data Privileged Reader: https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles/storage#storage-file-data-privileged-reader
However, with Az CLI version 2.79 and up, a new call was added: "Microsoft.Storage/storageAccounts/fileServices/shares/read", which is not included in the before mentioned RBAC roles. This causes a breaking change where the RBAC role no longer has enough permissions to perform the same task.
Related command
az storage file list
Errors
ERROR:
You do not have the required permissions needed to perform this operation.
Depending on your operation, you may need to be assigned one of the following roles:
"Storage Blob Data Owner"
"Storage Blob Data Contributor"
"Storage Blob Data Reader"
"Storage Queue Data Contributor"
"Storage Queue Data Reader"
"Storage Table Data Contributor"
"Storage Table Data Reader"
If you want to use the old authentication method and allow querying for the right account key, please use the "--auth-mode" parameter and "key" value.
Issue script & Debug output
task: AzureCLI@2
displayName: 'Validate Deployment'
inputs:
azureSubscription: serviceprincipal
scriptType: 'pscore'
scriptLocation: 'inlineScript'
inlineScript: |
Diagnostic Log with Az CLI 2.78:

Diagnostic Log with Az CLI 2.79+:

Expected behavior
A list of files from the script
Environment Summary
Working version:
Not-working version:
Additional context
No response