> For the complete documentation index, see [llms.txt](https://docs.frends.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.frends.com/tasks/tasks/azure-blob-storage/deleteblob.md).

# DeleteBlob

Task version: 3.0.0

Required Frends version: 5.7+

Required .NET version: 8.0

Compatible Agents: Crossplatform

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

## Task Parameters

{% tabs %}
{% tab title="Input" %}

| Name                     | Description                                                                                                                                                                                                                                                                  |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ContainerName : `String` | <p>Name of the Azure Blob Storage container where the data will be uploaded.</p><p>Naming: lowercase</p><p>Valid chars: alphanumeric and dash, but cannot start or end with dash.</p><p><br>Default: <code>test-container</code><br>Example: <code>test-container</code></p> |
| BlobName : `String`      | <p>Name of the blob to delete.</p><p><br>Default: <code>-</code><br>Example: <code>TestFile.xml</code></p>                                                                                                                                                                   |
| {% endtab %}             |                                                                                                                                                                                                                                                                              |

{% tab title="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>: Defines which connection method should be used for connecting to Azure Blob Storage.</li><li><code>OAuth2</code>: Defines which connection method should be used for connecting to Azure Blob Storage.</li><li><code>SasToken</code>: Defines which connection method should be used for connecting to Azure Blob Storage.</li><li><code>ArcManagedIdentity</code>: Defines which connection method should be used for connecting to Azure Blob Storage.</li><li><code>ArcManagedIdentityCrossTenant</code>: Defines which connection method should be used for connecting to Azure Blob Storage.</li></ul><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="Options" %}

| Name                                          | Description                                                                                                                                                                                                                                                                                                                                                                                                  |
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| SnapshotDeleteOption : `SnapshotDeleteOption` | <p>What should be done with blob snapshots?</p><p>Possible values:</p><ul><li><code>None</code>: What should be done with blob snapshots?</li><li><code>IncludeSnapshots</code>: What should be done with blob snapshots?</li><li><code>DeleteSnapshotsOnly</code>: What should be done with blob snapshots?</li></ul><p><br>Default: <code>1</code><br>Example: <code>IncludeSnapshots</code></p>           |
| VerifyETagWhenDeleting : `String`             | <p>Delete blob only if the ETag matches. Leave empty if verification is not needed.</p><p><br>Default: <code>-</code><br>Example: <code>0x9FE13BAA323E5A4</code></p>                                                                                                                                                                                                                                         |
| FailOnBlobNotFound : `Boolean`                | <p>If true, the absence of the blob is treated as a failure that triggers the 'ThrowErrorOnFailure' policy (potentially throwing an exception).</p><p>If false, the method returns Success = false with a 'DeleteBlobError' object, but wont't throw an exception for this reason, regardless of the 'ThrowErrorOnFailure' setting.</p><p><br>Default: <code>False</code><br>Example: <code>false</code></p> |
| ThrowErrorOnFailure : `Boolean`               | <p>If true, the task throws an exception on failure.</p><p>If false, the task returns Success = false with error details in the Error property.</p><p><br>Default: <code>True</code><br>Example: <code>true</code></p>                                                                                                                                                                                       |
| ErrorMessageOnFailure : `String`              | <p>Optional custom error message prefix included in the exception or result Error.Message on failure.</p><p>If left empty, the original error message is used.</p><p><br>Default: <code>-</code><br>Example: <code>DeleteBlob failed for my-container/my-blob.txt</code></p>                                                                                                                                 |
| {% endtab %}                                  |                                                                                                                                                                                                                                                                                                                                                                                                              |
| {% endtabs %}                                 |                                                                                                                                                                                                                                                                                                                                                                                                              |

## Task Result

| Name                      | Description                                                                                                                                                                   |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Success : `Boolean`       | <p>True if the blob was successfully deleted. False if the blob did not exist or if an error occurred (and 'ThrowErrorOnFailure' is false).<br>Example: <code>true</code></p> |
| Error : `DeleteBlobError` | <p>Error information when Success is false. object { string Message, object AdditionalInfo }<br>Example: <code>null</code></p>                                                |

## Task Changelog

Changelog for Task Frends.AzureBlobStorage.DeleteBlob.

### \[3.0.0] - 2026-05-04

#### Changed

* \[Breaking] Renamed `ThrowErrorIfBlobDoesNotExists` to `FailOnBlobNotFound` in Options tab.
  * To upgrade: set `FailOnBlobNotFound` to the same value as the old `ThrowErrorIfBlobDoesNotExists`.
* \[Breaking] Removed `Info` from result; replaced with `Error { Message, AdditionalInfo }`.
  * To upgrade: update any process steps reading `result.Info` to use `result.Error.Message` instead.

#### Added

* Added `ThrowErrorOnFailure` (default: `true`) to Options tab for standardised error handling.
* Added `ErrorMessageOnFailure` to Options tab for a custom error message prefix on failure.

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

#### Changed

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

### \[1.5.0] - 2026-01-26

#### Added

* Add options to support Arc Managed Identity authentication.

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

#### Changed

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

### \[1.3.0] - 2025-12-12

#### Fixed

* Fixed typo in error message.

### \[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.1] - 2024-01-24

#### Updated

* Azure.Identity to version 1.10.4
* Azure.Storage.Blobs to version 12.19.1

### \[1.1.0] - 2022-12-20

#### Added

* OAuth2 as a new additional authentication method.
* New parameter 'Options.ThrowErrorIfBlobDoesNotExists' to choose if non existing blob throws an error or return an error as Result.Info.

#### Changed

* New parameter 'Info' to result object.
* Dependency update: Removed dependencies: System.ComponentModel.Annotations Azure.Core Azure.Storage.Common MimeMapping Microsoft.CSharp

  Added dependencies: Azure.Identity 1.8.0

  Update dependencies: Azure.Storage.Blobs 12.13.1 to 12.14.1

### \[1.0.1] - 2022-08-31

#### Changed

* Security updated for dependency: Azure.Storage.Blobs 12.10.0 to 12.13.1 Also updated dependencies: Azure.Storage.Common 12.9.0 to 12.12.0 Azure.Core 1.20.0 to 1.25.0 System.ComponentModel.Annotations 4.7.0 to 5.0.0

### \[1.0.0] - 2022-03-07

#### Added

* Initial implementation of Frends.AzureBlobStorage.DeleteBlob.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.frends.com/tasks/tasks/azure-blob-storage/deleteblob.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
