> 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/writeblob.md).

# WriteBlob

Task version: 2.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.WriteBlob>

## Task Parameters

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

| Name                          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| SourceType : `SourceType`     | <p>Selection of source types.</p><p>Possible values:</p><ul><li><code>String</code>: Selection of source types.</li><li><code>Bytes</code>: Selection of source types.</li></ul><p><br>Default: <code>1</code><br>Example: <code>SourceType.String</code></p>                                                                                                                                                                                                                                                                                                                                                                                             |
| ContentString : `String`      | <p>Source content in string format.</p><p><br>Default: <code>-</code><br>Example: <code>This is test</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ContentBytes : `Byte[]`       | <p>Source content in byte array.</p><p><br>Default: <code>-</code><br>Example: <code>VGhpcyBpcyB0ZXN0</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Encoding : `FileEncoding`     | <p>Set desired content-encoding.</p><p>Defaults to UTF8 BOM.</p><p>Possible values:</p><ul><li><code>UTF8</code>: Set desired content-encoding.</li></ul><p>Defaults to UTF8 BOM.</p><ul><li><code>Default</code>: Set desired content-encoding.</li></ul><p>Defaults to UTF8 BOM.</p><ul><li><code>ASCII</code>: Set desired content-encoding.</li></ul><p>Defaults to UTF8 BOM.</p><ul><li><code>WINDOWS1252</code>: Set desired content-encoding.</li></ul><p>Defaults to UTF8 BOM.</p><ul><li><code>Other</code>: Set desired content-encoding.</li></ul><p>Defaults to UTF8 BOM.</p><p><br>Default: <code>0</code><br>Example: <code>utf8</code></p> |
| EnableBOM : `Boolean`         | <p>Enables BOM for UTF-8.</p><p><br>Default: <code>True</code><br>Example: <code>-</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| FileEncodingString : `String` | <p>Content encoding as string. A partial list of possible encodings: <https://en.wikipedia.org/wiki/Windows_code_page#List>.</p><p><br>Default: <code>-</code><br>Example: <code>windows-1252</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| {% endtab %}                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |

{% tab title="Destination" %}

| Name                                        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ContainerName : `String`                    | <p>Name of the Azure Blob Storage container.</p><p>Task will convert all letters to lowercase.</p><p>See more info: <https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata#container-names></p><p><br>Default: <code>-</code><br>Example: <code>examplecontainer</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| BlobName : `String`                         | <p>Name of the blob. Blob name can also be folder structure and folders will be created to Blob Storage.</p><p>See more info: <https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata#blob-names></p><p><br>Default: <code>-</code><br>Example: <code>BlobName.txt; C:\folder\blobName.txt</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Tags : `Tag[]`                              | <p>Tags for the block or append blob.</p><p><br>Default: <code>-</code><br>Example: <code>{name, value}</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| CreateContainerIfItDoesNotExist : `Boolean` | <p>Determines if the container should be created if it does not exist.</p><p>See <https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata> for naming rules.</p><p><br>Default: <code>False</code><br>Example: <code>false</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| HandleExistingFile : `HandleExistingFile`   | <p>How the existing blob will be handled.</p><p>Append: Append the blob with Source.SourceFile. Block and Page blobs will be downloaded as a temp file which will be deleted after local append and upload processes are complete. No downloading needed for Append Blob.</p><p>Overwrite: The original blob will be deleted before uploading the new one.</p><p>Error: Depending on Options.ThrowErrorOnFailure, throw an exception or Result will contain an error message instead of the blob's URL.</p><p>Possible values:</p><ul><li><code>Error</code>: How the existing blob will be handled.</li></ul><p>Append: Append the blob with Source.SourceFile. Block and Page blobs will be downloaded as a temp file which will be deleted after local append and upload processes are complete. No downloading needed for Append Blob.</p><p>Overwrite: The original blob will be deleted before uploading the new one.</p><p>Error: Depending on Options.ThrowErrorOnFailure, throw an exception or Result will contain an error message instead of the blob's URL.</p><ul><li><code>Overwrite</code>: How the existing blob will be handled.</li></ul><p>Append: Append the blob with Source.SourceFile. Block and Page blobs will be downloaded as a temp file which will be deleted after local append and upload processes are complete. No downloading needed for Append Blob.</p><p>Overwrite: The original blob will be deleted before uploading the new one.</p><p>Error: Depending on Options.ThrowErrorOnFailure, throw an exception or Result will contain an error message instead of the blob's URL.</p><ul><li><code>Append</code>: How the existing blob will be handled.</li></ul><p>Append: Append the blob with Source.SourceFile. Block and Page blobs will be downloaded as a temp file which will be deleted after local append and upload processes are complete. No downloading needed for Append Blob.</p><p>Overwrite: The original blob will be deleted before uploading the new one.</p><p>Error: Depending on Options.ThrowErrorOnFailure, throw an exception or Result will contain an error message instead of the blob's URL.</p><p><br>Default: <code>0</code><br>Example: <code>HandleExistingFile.Error</code></p> |
| Compress : `Boolean`                        | <p>Should the string be compressed before sending?</p><p><br>Default: <code>False</code><br>Example: <code>-</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                                                                                                                                                                                                                                                            |
| ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ThrowErrorOnFailure : `Boolean` | <p>True: Throw an exception.</p><p>False: If the error is ignorable, such as when a Blob already exists, the error will be added to the Result.ErrorMessages list instead of stopping the Task.</p><p><br>Default: <code>True</code><br>Example: <code>true</code></p> |
| {% endtab %}                    |                                                                                                                                                                                                                                                                        |
| {% endtabs %}                   |                                                                                                                                                                                                                                                                        |

## Task Result

| Name                | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Success : `Boolean` | <p>Operation complete. Operation is seens as completed if an ignorable error has occured and Options.ThrowErrorOnFailure is set to false.<br>Example: <code>true</code></p>                                                                                                                                                                                                                                                                                 |
| Info : `String`     | <p>This object contains the source file path and the URL of the blob. If an ignorable error occurs, such as when a blob already exists and Options.ThrowErrorOnFailure is set to false, the URL will be replaced with the corresponding error message.age.<br>Example: <code>{ { c:\temp\examplefile.txt, <https://storage.blob.core.windows.net/container/examplefile.txt> }, { c:\temp\examplefile2.txt, Blob examplefile2 already exists. } }</code></p> |
| Uri : `String`      | URI of uploaded file.                                                                                                                                                                                                                                                                                                                                                                                                                                       |

## Task Changelog

Changelog for Task Frends.AzureBlobStorage.WriteBlob.

### \[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-23

#### Added

* Add options to support Arc Managed Identity authentication.

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

#### Changed

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

### \[1.1.0] - 2025-10-07

#### Fixed

* Change returned info type from 3rd party BlobContentInfo to string with json.

### \[1.0.0] - 2025-01-24

#### Added

* Initial implementation of Frends.AzureBlobStorage.WriteBlob.


---

# 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/writeblob.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.
