How to view the tags key/value in a blob using login as authentication?

Gregorio Montaño 246 Reputation points
2022-09-02T00:21:00.087+00:00

Hi,

I want to be able to view the key and tag values using the CLI command (a) or (b) given the blob specified by {path}.
Or, list the blobs meeting the tag-filter conditions in (c) but getting the

Error message displayed:
a) <urllib3.connection.HTTPSConnection object at 0x7fbdd5228190>: Failed to establish a new connection: [Errno -2] Name or service not known
b) <urllib3.connection.HTTPSConnection object at 0x7f351d03d7e0>: Failed to establish a new connection: [Errno -2] Name or service not known
c) <urllib3.connection.HTTPSConnection object at 0x7fb0eb30e200>: Failed to establish a new connection: [Errno -2] Name or service not known

Run the command
a) az storage fs file metadata show -p {path} -f {filesystem} --account-name {account-name} --auth-mode login
b) az storage blob tag list -n {path} --container-name {filesystem/container_name} --account-name {account-name} --auth-mode login
c) az storage blob filter --tag-filter "@MetContainer ='{container_name}' and "{key}"='{value}'" --query "[].name" --output tsv --only-show-errors --account-name {account-name}
backup --auth-mode login

Environment summary
{
"azure-cli": "2.39.0",
"azure-cli-core": "2.39.0",
"azure-cli-telemetry": "1.0.6",
"extensions": {
"storage-blob-preview": "0.6.1"
}
}

Permissions:
Microsoft.Storage/storageAccounts/fileServices/read
Microsoft.Storage/storageAccounts/blobServices/containers/read
Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read
Microsoft.Storage/storageAccounts/blobServices/containers/blobs/tags/read

Thanks.

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,925 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,625 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SaiKishor-MSFT 17,221 Reputation points
    2022-09-22T01:35:54.507+00:00

    @Gregorio Montaño Are you able to get the tag values if you give the command- az storage blob metadata show --container-name <name> --name <blob name> --account-name <name> --auth-mode login as mentioned in the Github thread? I was able to use this command and get the result for the same. Please let me know.

    243676-2022-09-21-18-36-31-sai0009-microsoft-azure-and-14.png