Skip to main content
net11.0

ASP.NET Core middleware that enables an application to support the Microsoft Account authentication workflow. This package was built from the source code at https://github.com/dotnet/dotnet/tree/e2c1e00b3d0f96afb892fb261d5921565b400246

Published
Aug 11, 2026
2mo ago
Total Downloads
88.5M
88,501,024

Install

dotnet add package Microsoft.AspNetCore.Authentication.MicrosoftAccount --version 11.0.0-preview.7.26381.103
ProductVersions
.NET
net11.0

README

About

Microsoft.AspNetCore.Authentication.MicrosoftAccount provides ASP.NET Core middleware that enables applications to support the Microsoft Account authentication workflow.

How to Use

To use Microsoft.AspNetCore.Authentication.MicrosoftAccount, follow these steps:

Installation

dotnet add package Microsoft.AspNetCore.Authentication.MicrosoftAccount

Configuration

  1. Refer to the guide in the official documentation here to create the app in Microsoft Developer Portal
  2. Follow the steps in the official documentation here to store the Microsoft client ID and secret
  3. Add the Authentication service to your app's Program.cs:
    var builder = WebApplication.CreateBuilder(args);
    
    builder.Services.AddAuthentication().AddMicrosoftAccount(microsoftOptions =>
    {
        microsoftOptions.ClientId = builder.Configuration["Authentication:Microsoft:ClientId"];
        microsoftOptions.ClientSecret = builder.Configuration["Authentication:Microsoft:ClientSecret"];
    });
    

Main Types

The main types provided by this package are:

  • MicrosoftAccountOptions: Represents the options for configuring Microsoft Account authentication
  • MicrosoftAccountHandler: The authentication handler responsible for processing Microsoft Account authentication requests and generating the appropriate authentication ticket

Additional Documentation

For additional documentation and examples, refer to the official documentation on Microsoft Account login setup in ASP.NET Core.

Feedback & Contributing

Microsoft.AspNetCore.Authentication.MicrosoftAccount is released as open-source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Changes from Previous Version

No structural changes between v11.0.0-preview.6.26359.118 and v11.0.0-preview.7.26381.103.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

This version is marked prerelease. Validate its API and upgrade path before production use.Compatibility metadata lists 1 target framework; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.