Blazorade.Msal 2.2.0

Additional Details

This package has been deprecated, mainly because of its problems when used with .NET MAUI Blazor Hybrid apps. Another Blazorade library focusing on authentication will come out in the future that will support Blazor on any platform, including .NET MAUI Blazor Hybrid apps.

dotnet add package Blazorade.Msal --version 2.2.0
NuGet\Install-Package Blazorade.Msal -Version 2.2.0
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="Blazorade.Msal" Version="2.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Blazorade.Msal --version 2.2.0
#r "nuget: Blazorade.Msal, 2.2.0"
#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 Blazorade.Msal as a Cake Addin
#addin nuget:?package=Blazorade.Msal&version=2.2.0

// Install Blazorade.Msal as a Cake Tool
#tool nuget:?package=Blazorade.Msal&version=2.2.0

Blazorade MSAL

Provides easy to use authentication and token acquisition for Blazor applications with the help of Microsoft Authentication Library. Supports both Blazor Server and Blazor WebAssembly applications.

Getting Started

After you have installed the package to your application, refer to the Getting Started section on the package wiki for information on how to easily get started with Blazorade MSAL.


Blazorade MSAL facilitates authentication and authorization for instance with the following services.

  • BlazoradeMsalService - A service class that handles all communication with the MSAL JavaScript library for you. You don't have to write a single line of JavaScript code in your application.
  • BlazoradeRequestFactory - A factory service that creates HttpRequestMessage instances. These request messages are configured with an access token provided by BlazoradeMsalService which enables you to easily call into APIs such as Microsoft Graph.

These services are registered in your application's service collection with the AddBlazoradeMsal method as described in the Getting Started section on the Blazoarde MSAL wiki.

Sample Applications

The Github repository for Blazorade MSAL contains several sample applications that demonstrate how you can leverage Blazorade MSAL in your own application.

  • GraphClient - A WebAssembly application that demonstrates how to send HTTP requests to Microsoft Graph with the help of Blazorade MSAL. Can be applied to any other REST API that requires access tokens.
  • BlazorServerSample - A Blazor Server application that demonstrates how you can make use of the on-demand token acquisition provided by Blazorade MSAL.
  • BlazorWasmSample - The same as BlazorServerSample but implemented as a Blazor WebAssembly application. Shares much of the features with the Server sample through the SharedComponentsSample component library.

Version Highlights

This section lists the main improvements in each published version.


Added support for Azure AD B2C as Identity Provider.


This version includes the following pull requests.

Further Reading

To learn more, read these Blazorade MSAL articles on Mika Berglund's blog.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.2.0 4,444 9/13/2022
2.1.0 4,156 6/8/2022
2.0.0 1,615 2/28/2022
1.1.1 7,861 3/16/2021
1.1.0 1,794 2/13/2021
1.0.1 357 2/12/2021
1.0.0 340 2/11/2021