azure-cli: Filter blob by tags using SAS-token in azure CLI fails with authentication error
Using Azure CLI I am trying to find all the blobs using tag filters. But I am unable to do so. I get the error
“Authentication failure. This may be caused by either invalid account key, connection string or sas token value provided for your storage account.”
Below is the CLI command I tried
az storage blob filter --tag-filter "@container= 'containerxx' and Tag1='value'" --account-name stracc1 --sas-token "sv=2021-08-06&st=2022-10-11T07%3A40%3A00Z&se=2022-10-13T07%3A40%3A47Z&sr=c&sp=racwdxltf&sig=mZ4%2F4oXQV3Y4xcBoxxxxxEjJ1zmozb3ikmEddRc%3D"
I tried to confirm if the sas token provided is valid by running below command and it does execute fine returning a json. This confirms that the SAS token is valid. You can also see I have given Filter tag permission (f) in sas token generated.
az storage blob exists --account-name stracc1 --container-name containerxx --name yy.html --sas-token “sv=2021-08-06&st=2022-10-11T07%3A40%3A00Z&se=2022-10-13T07%3A40%3A47Z&sr=c&sp=racwdxltf&sig=mZ4%2F4oXQV3Y4xcBoxxxxxEjJ1zmozb3ikmEddRc%3D”
Kindly Help
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 19 (8 by maintainers)
@Venu-prahalad
You don’t have to raise a new issue for Storage Explorer. This issue for Storage explorer has already been created here: https://github.com/microsoft/AzureStorageExplorer/issues/6184 and its is addressed.
The fix for Storage explorer will be released by end of November. See the milestone here: https://github.com/microsoft/AzureStorageExplorer/milestone/60
@Venu-prahalad Thanks for your reply. The tentative ETA for the fix release in AzCLI and Powershell is 11/1/2022. Hope this helps.
@Venu-prahalad It appears that PowerShell, CLI, and Storage Explorer are calling Find Blobs by Tag instead of Find Blobs by Tag in Container for container-level Find Blobs by Tag. This is causing container-level SAS URLs to not function properly. We are discussing this with the Product owners. I will keep you posted. There is no ETA for the fix.