Skip to content

Azure Listing

In order to list the content of an Azure blob container you need to execute connect list az. There are three options to authenticate:

  • Container name, account name, account key
  • Connection string
  • Shared Access Signature (SAS) URL

Connecting with Account name and Account key

Section titled “Connecting with Account name and Account key”

In order to list the content of an Azure blob container using account name and account key you need to execute connect list az followed by:

  • --az-container then the blob container name
  • --az-account-name then the AZ account name
  • --az-account-key then the AZ account key

For example:

Terminal window
$ connect list az --az-container myblob --az-account-name myaccount --az-account-key 1O8MbYTgY8Z/KD7Ip181dar7zvWfpTyzGIVdX1WsCmBSRj+XL1oXTkcMWri2ejhfmcA7/ZAFO6YL+ASt/GRBow==
2025/05/22 13:34:23 INFO Listing az://myblob/
d--------- 0 folder1/
-rw-rw-r-- 1024 Sep 15 21:41 file1.txt
-rw-rw-r-- 1024 Sep 15 21:41 file2.txt
-rw-rw-r-- 1024 Sep 15 21:41 file3.txt

In order to list the content of an Azure blob container using connection string you need to execute connect list az followed by:

  • --az-connection-string then the connection string

For example:

Terminal window
$ connect list az --az-connection-string "DefaultEndpointsProtocol=https;BlobEndpoint=https://myaccount.blob.core.windows.net/mybob;AccountName=myaccount;AccountKey=1O8MbYTgY8Z/KD7Ip181dar7zvWfpTyzGIVdX1WsCmBSRj+XL1oXTkcMWri2ejhfmcA7/ZAFO6YL+ASt/GRBow=="
2025/05/22 13:37:24 INFO Listing az://myblob/
d--------- 0 folder1/
-rw-rw-r-- 1024 Sep 15 21:41 file1.txt
-rw-rw-r-- 1024 Sep 15 21:41 file2.txt
-rw-rw-r-- 1024 Sep 15 21:41 file3.txt

In order to list the content of an Azure blob container using Shared Access Signature (SAS) URL you need to execute connect list az followed by:

  • --az-sas-url then the SAS URL

For example:

Terminal window
$ connect list az --az-sas-url "https://myaccount.blob.core.windows.net/myblob?sp=racwdli&st=2024-09-11T14:53:45Z&se=2024-09-25T22:53:45Z&spr=https&sv=2022-11-02&sr=c&sig=WZl3RWGl6pPHKUVyGlWB0ZxYjcmIK%2FbCkdjglw2wku0%3D"
2025/05/22 13:37:24 INFO Listing az://myblob/
d--------- 0 folder1/
-rw-rw-r-- 1024 Sep 15 21:41 file1.txt
-rw-rw-r-- 1024 Sep 15 21:41 file2.txt
-rw-rw-r-- 1024 Sep 15 21:41 file3.txt

You can also specify the optional target folder to list with:

  • -d, --folder remote folder name

If you don’t specify the folder, the command will list root folder of the blob.

For example:

Terminal window
$ connect list az -d folder1 --az-container myblob --az-account-name myaccount --az-account-key 1O8MbYTgY8Z/KD7Ip181dar7zvWfpTyzGIVdX1WsCmBSRj+XL1oXTkcMWri2ejhfmcA7/ZAFO6YL+ASt/GRBow==
2025/05/22 13:46:30 INFO Listing az://myblob/folder1/
-rw-rw-r-- 1024 Sep 15 21:31 folder1/file1.txt
-rw-rw-r-- 1024 Sep 15 21:31 folder1/file2.txt
-rw-rw-r-- 1024 Sep 15 21:31 folder1/file3.txt
Terminal window
Usage:
connect list az [command] [flags]
Flags:
--az-account-key string AZ account key
--az-account-name string AZ account name
--az-connection-string string AZ connection string
--az-container string AZ container name
--az-sas-url string AZ SAS URL
Global Flags:
-d, --folder string Folder to list files
--godebug Turns on debug mode
--help Prints help for the command
--log-format string Log output format: text|json (default "text")
--no-color Do not use colors in logs
--quiet Makes no output

Please check here for information on the possible errors.