# ListBlobsInContainer

Required Frends version: 5.7+

Required .NET version: 8.0

Compatible Agents: Unknown

Source code: <https://github.com/FrendsPlatform/Frends.AzureBlobStorage/tree/main/Frends.AzureBlobStorage.ListBlobsInContainer>

{% tabs %}
{% tab title="Parameter: Source" %}

| Name                     | Description                                                                                                                               |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
| ContainerName : `String` | <p>The name of the blob container in the storage account.</p><p><br>Default: <code>-</code><br>Example: <code>ExampleContainer</code></p> |
| {% endtab %}             |                                                                                                                                           |

{% tab title="Parameter: Connection" %}

| Name                                      | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| AuthenticationMethod : `ConnectionMethod` | <p>Defines which connection method should be used for connecting to Azure Blob Storage.</p><p>Possible values:</p><ul><li><code>ConnectionString</code>:</li></ul><p>Defines which connection method should be used for connecting to Azure Blob Storage.</p><ul><li><code>OAuth2</code>:</li></ul><p>Defines which connection method should be used for connecting to Azure Blob Storage.</p><ul><li><code>SasToken</code>:</li></ul><p>Defines which connection method should be used for connecting to Azure Blob Storage.</p><ul><li><code>ArcManagedIdentity</code>:</li></ul><p>Defines which connection method should be used for connecting to Azure Blob Storage.</p><ul><li><code>ArcManagedIdentityCrossTenant</code>:</li></ul><p>Defines which connection method should be used for connecting to Azure Blob Storage.</p><p><br>Default: <code>1</code><br>Example: <code>ConnectionMethod.ConnectionString</code></p> |
| 🗝ConnectionString : `String`             | <p>Connection string to Azure storage.</p><p><br>Default: <code>-</code><br>Example: <code>DefaultEndpointsProtocol=https;AccountName=account-name;AccountKey=abc==;EndpointSuffix=core.windows.net</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ApplicationId : `String`                  | <p>Application (Client) ID of Azure AD Application.</p><p><br>Default: <code>-</code><br>Example: <code>Y6b1hf2a-80e2-xyz2-abc33h-3a7c3a8as4b7f</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| TenantId : `String`                       | <p>Tenant ID of Azure Tenant.</p><p><br>Default: <code>-</code><br>Example: <code>Y6b1hf2a-80e2-xyz2-abc33h-3a7c3a8as4b7f</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| 🗝ClientSecret : `String`                 | <p>Client Secret of Azure AD Application.</p><p><br>Default: <code>-</code><br>Example: <code>Password!</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| 🗝SasToken : `String`                     | <p>A shared access signature to use when connecting to an Azure storage container.</p><p>Grants restricted access rights to Azure Storage resources when combined with URI.</p><p><br>Default: <code>-</code><br>Example: <code>sv=2021-04-10\&se=2022-04-10T10%3A431Z\&sr=c\&sp=l\&sig=ZJg983RovE%23ZXI</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| StorageAccountName : `String`             | <p>Name of the Azure storage account.</p><p><br>Default: <code>-</code><br>Example: <code>TestStorage</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| Scopes : `String[]`                       | <p>Scopes used when authenticating with Arc Managed Identity Cross Tenant.</p><p><br>Default: <code>-</code><br>Example: <code>\[api://AzureADTokenExchange/.default]</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| TargetTenantId : `String`                 | <p>Target Tenant ID of Azure Tenant.</p><p><br>Default: <code>-</code><br>Example: <code>Y6b1hf2a-80e2-xyz2-abc33h-3a7c3a8as4b7f</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| TargetClientId : `String`                 | <p>Target Client ID of Azure Tenant.</p><p><br>Default: <code>-</code><br>Example: <code>Y6b1hf2a-80e2-xyz2-abc33h-3a7c3a8as4b7f</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| {% endtab %}                              |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |

{% tab title="Parameter: Options" %}

| Name                                  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ListingStructure : `ListingStructure` | <p>List blobs in a flat listing structure or hierarchically.</p><p>Hierarchical listing returns container's blobs and subdirectories names such as file.txt or directoryname/.</p><p>Flat listing does the same as hierarchical listing but also returns blobs in those subdirectories such as directoryname/file.txt.</p><p>Possible values:</p><ul><li><code>Flat</code>:</li></ul><p>List blobs in a flat listing structure or hierarchically.</p><p>Hierarchical listing returns container's blobs and subdirectories names such as file.txt or directoryname/.</p><p>Flat listing does the same as hierarchical listing but also returns blobs in those subdirectories such as directoryname/file.txt.</p><ul><li><code>Hierarchical</code>:</li></ul><p>List blobs in a flat listing structure or hierarchically.</p><p>Hierarchical listing returns container's blobs and subdirectories names such as file.txt or directoryname/.</p><p>Flat listing does the same as hierarchical listing but also returns blobs in those subdirectories such as directoryname/file.txt.</p><p><br>Default: <code>0</code><br>Example: <code>ListingStructure.Flat</code></p> |
| Prefix : `String`                     | <p>Specify a prefix to return blobs whose names begin with that character or string.</p><p><br>Default: <code>-</code><br>Example: <code>test</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| {% endtab %}                          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

{% tab title="Result: Result" %}

| Name                        | Description                                                                                                                                                                                                                                                                                 |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| BlobList : `List<BlobData>` | <p>List of blobs.<br>Example: <code>\[ { Type = Block, Name = file.txt, URL = <https://storageaccount.blob.core.windows.net/containername/file.txt>, ETag = 0x8D6FACDEB709651, CreatedOn = 2023-12-11T09:00:00.743185+02:00, LastModified = 2023-12-11T09:00:00.743185+02:00 } ]</code></p> |
| {% endtab %}                |                                                                                                                                                                                                                                                                                             |

{% tab title="Changelog" %}

## Changelog

### \[2.0.0] - 2026-04-26

#### Changed

* Standardized parameter names and validation across all Azure Blob Storage tasks for consistency.

### \[1.3.0] - 2026-01-15

#### Changed

* Updated Azure packages to the latest versions:
* Azure.Storage.Blobs 12.27.0
* Azure.Identity 1.17.1

### \[1.2.0] - 2024-08-21

#### Updated

* Updated Azure.Identity to version 1.12.0.

#### Changed

* Fixed outdated environment variable names in tests and workflows.

### \[1.1.2] - 2024-01-17

#### Updated

* Azure.Identity from 1.8.1 to 1.10.2
* Azure.Storage.Blobs from 12.11.0 to 12.13.0

#### Fixed

* Documentation fixes.
* Changed the Task to throw ArgumentException instead of generic Exception.

### \[1.1.1] - 2023-12-11

#### Added

* Result.CreatedOn.
* Result.LastModified.

### \[1.1.0] - 2023-02-01

#### Added

* OAuth2 authentication method.

#### Changed

* Rename: Result.URI to Result.URL.

#### Fixed

* Memory leak fix by unloading assembly context after Task execution.
* Result.URL returns complete URL to each blob.

### \[1.0.0] - 2022-04-14

#### Added

* Initial implementation
  {% endtab %}
  {% endtabs %}
