Azure.Extensions.AspNetCore.DataProtection.Blobs 1.3.4

Prefix Reserved
dotnet add package Azure.Extensions.AspNetCore.DataProtection.Blobs --version 1.3.4                
NuGet\Install-Package Azure.Extensions.AspNetCore.DataProtection.Blobs -Version 1.3.4                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Azure.Extensions.AspNetCore.DataProtection.Blobs" Version="1.3.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Azure.Extensions.AspNetCore.DataProtection.Blobs --version 1.3.4                
#r "nuget: Azure.Extensions.AspNetCore.DataProtection.Blobs, 1.3.4"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Azure.Extensions.AspNetCore.DataProtection.Blobs as a Cake Addin
#addin nuget:?package=Azure.Extensions.AspNetCore.DataProtection.Blobs&version=1.3.4

// Install Azure.Extensions.AspNetCore.DataProtection.Blobs as a Cake Tool
#tool nuget:?package=Azure.Extensions.AspNetCore.DataProtection.Blobs&version=1.3.4                

Azure Storage Blob Key Store for Microsoft.AspNetCore.DataProtection

The Azure.Extensions.AspNetCore.DataProtection.Blobs package allows storing ASP.NET Core DataProtection keys in Azure Blob Storage. Keys can be shared across several instances of a web app. Apps can share authentication cookies or CSRF protection across multiple servers.

Getting started

Install the package

Install the package with NuGet:

dotnet add package Azure.Extensions.AspNetCore.DataProtection.Blobs


You need an Azure subscription, Storage Account and Storage Container 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 <storage-account> --resource-group <resource-group> --location westus --sku Standard_LRS
az storage container create --account-name <storage-account> -n <container>

# Give write access to a user
az role assignment create --role "Storage Blob Data Contributor" --assignee <your_email> --scope "/subscriptions/<subscription>/resourceGroups/<resource-group>/providers/Microsoft.Storage/storageAccounts/<storage-account>/blobServices/default/containers/<container>"

# OR give write access to a service principal (application)
az role assignment create --role "Storage Blob Data Contributor" --assignee-object-id <application_id> --scope "/subscriptions/<subscription>/resourceGroups/<resource-group>/providers/Microsoft.Storage/storageAccounts/<storage-account>/blobServices/default/containers/<container>"

Key concepts

Thread safety

We guarantee that all client instance methods are thread-safe and independent of each other (guideline). This ensures that the recommendation of reusing client instances is always safe, even across threads.

Additional concepts

Client options | Accessing the response | Long-running operations | Handling failures | Diagnostics | Mocking | Client lifetime


To enable persisting keys to Azure Blob Storage call the PersistKeysToAzureBlobStorage method. The Uri provided has to be a blob URI in the following form https://{storage_account}{container}/{blob}.

public void ConfigureServices(IServiceCollection services)
        .PersistKeysToAzureBlobStorage(new Uri("<full-blob-URI>"), new DefaultAzureCredential());

The Azure Identity library provides easy Azure Active Directory support for authentication.

Authenticating using a connection string

public void ConfigureServices(IServiceCollection services)
        .PersistKeysToAzureBlobStorage("<connection string>", "<container name>", "<blob name>");

Next steps

Read more about DataProtection in ASP.NET Core.


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

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

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (20)

Showing the top 5 NuGet packages that depend on Azure.Extensions.AspNetCore.DataProtection.Blobs:

Package Downloads

Package Description


Orchard Core Framework is an application framework for building modular, multi-tenant applications on ASP.NET Core. Provides Azure Blob Storage for data protection key rings.


TheIdServer signing keys rotation.


Jeebs.Apps library


Purplebricks data protection mechanism to support encryption and decryption of messages

GitHub repositories (13)

Showing the top 5 popular GitHub repositories that depend on Azure.Extensions.AspNetCore.DataProtection.Blobs:

Repository Stars
Bitwarden infrastructure/backend (API, database, Docker, etc).
Documentation for ASP.NET Core
ASP.NET Core eCommerce software. nopCommerce is a free and open-source shopping cart.
Practical samples of ASP.NET Core 9 preview-6, 8.0, 7.0, 6.0, 5.0, 3.1, 2.2, and 2.1,projects you can use. Readme contains explanations on all projects.
Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.
Version Downloads Last updated
1.3.4 571,491 4/17/2024
1.3.3 772,439 2/13/2024
1.3.2 3,854,385 3/14/2023
1.3.1 66,121 3/7/2023
1.3.0 550,441 2/7/2023
1.2.3 2,297,357 9/12/2022
1.2.2 48,878 9/6/2022
1.2.1 4,813,170 5/14/2021
1.2.0 1,291,744 12/17/2020
1.1.0 15,693 12/16/2020
1.0.1 674,359 8/10/2020
1.0.0 61,318 6/5/2020
1.0.0-preview.2 485 5/5/2020