Microsoft Identity Web is a set of ASP.NET Core libraries that simplifies adding authentication and authorization support to web apps, web APIs, and daemon apps integrating with the Microsoft identity platform. It provides a single-surface API convenience layer that ties together ASP.NET or ASP.NET Core, their authentication middleware, and the Microsoft Authentication Library (MSAL) for .NET that acquires tokens. It can be installed via NuGet or by using a Visual Studio project template to create a new app project
Supported application scenarios
When building ASP.NET Core web apps or web APIs that use Microsoft Entra ID or Azure AD B2C for identity and access management (IAM), Microsoft Identity Web is recommended for these scenarios:
Microsoft identity web is available for .NET 6+, .NET 4.6.2, .NET 4.7.2, and .NET Standard 2.0.
Install from NuGet
Microsoft Identity Web is available on NuGet as a set of packages that provide modular functionality based on application requirements. Use the .NET CLI's dotnet add command or Visual Studio's NuGet Package Manager to install the appropriate packages:
Microsoft.Identity.Web.TokenAcquisition - The main package for other types of applications (daemon apps on .NET framework or .NET Core). Microsoft.Identity.Web and Microsoft.Identity.Web.OWIN reference this package.
Microsoft.Identity.Web.UI - Optional, for ASP.NET Core web apps. Adds UI for user sign-in and sign-out and an associated controller for web apps.
Learn how you can use the Microsoft Authentication Library for .NET (MSAL.NET) to acquire tokens from the Microsoft identity platform and access protected web APIs.
Microsoft.Identity.Web enables developers to create web apps that sign-in users and create protected Web APIs using the Microsoft identity platform. In this episode, Kyle Marsh comes on to catch with Christos about the new Microsoft.Identity.Web package for .NET developers. They go over the goals of the library and even show a quick demo of how to get started with it.[01:45] - The state of identity with ASP.NET and Microsoft Identity[06:03] - What’s Microsoft.Identity.Web all about?[11:29] - Hooking up