I
InsightNexus

Azure WebJobs Storage Blobs client library for .NET

Author

Rachel Davis

Published Feb 16, 2026

This extension provides functionality for accessing Azure Storage Blobs in Azure Functions.

Getting started

Install the package

Install the Storage Blobs extension with NuGet:

dotnet add package Azure.WebJobs.Extensions.Storage.Blobs

Prerequisites

You need an Azure subscription and aStorage Account to use this package.

To create a new Storage Account, you can use the Azure Portal,Azure PowerShell, or the Azure CLI. Here's an example using the Azure CLI:

az storage account create --name <your-resource-name> --resource-group <your-resource-group-name> --location westus --sku Standard_LRS

Authenticate the client

In order for the extension to access Blobs, you will need the connection string which can be found in the Azure Portal or by using the Azure CLI snippet below.

az storage account show-connection-string -g <your-resource-group-name> -n <your-resource-name>

The connection string can be supplied through AzureWebJobsStorage app setting.

Key concepts

Using Blob binding

Please follow the input binding tutorial and output binding tutorial to learn about using this extension for accessing Blobs.

Using Blob trigger

Please follow the tutorial to learn about triggering an Azure Function when a blob is modified.

Examples

Binding to string

public static class BlobFunction_String
{ [FunctionName("BlobFunction")] public static void Run( [BlobTrigger("sample-container/sample-blob-1")] string blobTriggerContent, [Blob("sample-container/sample-blob-2")] string blobContent, ILogger logger) { logger.LogInformation("Blob sample-container/sample-blob-1 has been updated with content: {content}", blobTriggerContent); logger.LogInformation("Blob sample-container/sample-blob-2 has content: {content}", blobContent); }
}

Reading from stream

public static class BlobFunction_ReadStream
{ [FunctionName("BlobFunction")] public static void Run( [BlobTrigger("sample-container/sample-blob-1")] Stream blobTriggerStream, [Blob("sample-container/sample-blob-2", FileAccess.Read)] Stream blobStream, ILogger logger) { using var blobTriggerStreamReader = new StreamReader(blobTriggerStream); logger.LogInformation("Blob sample-container/sample-blob-1 has been updated with content: {content}", blobTriggerStreamReader.ReadToEnd()); using var blobStreamReader = new StreamReader(blobStream); logger.LogInformation("Blob sample-container/sample-blob-2 has content: {content}", blobStreamReader.ReadToEnd()); }
}

Writing to stream

public static class BlobFunction_WriteStream
{ [FunctionName("BlobFunction")] public static async Task Run( [BlobTrigger("sample-container/sample-blob-1")] Stream blobTriggerStream, [Blob("sample-container/sample-blob-2", FileAccess.Write)] Stream blobStream, ILogger logger) { await blobTriggerStream.CopyToAsync(blobStream); logger.LogInformation("Blob sample-container/sample-blob-1 has been copied to sample-container/sample-blob-2"); }
}

Binding to Azure Storage Blob SDK types

public static class BlobFunction_BlobClient
{ [FunctionName("BlobFunction")] public static async Task Run( [BlobTrigger("sample-container/sample-blob-1")] BlobClient blobTriggerClient, [Blob("sample-container/sample-blob-2")] BlobClient blobClient, ILogger logger) { BlobProperties blobTriggerProperties = await blobTriggerClient.GetPropertiesAsync(); logger.LogInformation("Blob sample-container/sample-blob-1 has been updated on: {datetime}", blobTriggerProperties.LastModified); BlobProperties blobProperties = await blobClient.GetPropertiesAsync(); logger.LogInformation("Blob sample-container/sample-blob-2 has been updated on: {datetime}", blobProperties.LastModified); }
}

Troubleshooting

Please refer to Monitor Azure Functions for troubleshooting guidance.

Next steps

Read the introduction to Azure Function or creating an Azure Function guide.

Contributing

See the Storage CONTRIBUTING.md for details on building, testing, and contributing to this library.

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit cla.microsoft.com.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQor contact with any additional questions or comments.

Impressions