Microsoft.Identity.Web
High-level integration package for ASP.NET Core apps and APIs using Microsoft identity platforms.
Decision Guide
Security package selection should begin with trust boundaries and threat model, not convenience. Decide where identities are issued, how tokens are validated, and which authorization model maps to your service architecture and compliance obligations.
The decision to make
Which security package set should a .NET application use for authentication and authorization?
Curated starting points to compare. Always evaluate suitability against your specific project requirements.
High-level integration package for ASP.NET Core apps and APIs using Microsoft identity platforms.
JWT bearer authentication middleware for validating access tokens in ASP.NET Core APIs.
OpenID Connect and OAuth 2.0 server framework for issuing tokens and centralizing identity workflows.
Document trust boundaries, assets, actors, token issuers, and authorization decisions before selecting packages. Convert the threat model into explicit authentication, authorization, audit, and incident-response requirements.
Use platform middleware to validate issuer, audience, signing keys, lifetime, and algorithms. Enforce authorization with named policies close to the protected resource, including resource ownership checks where needed.
Store secrets in managed secret stores, rotate them, and test key rollover. Add security events and alerting for failed authentication, privilege changes, and sensitive actions without logging credentials or tokens.
Risk
Checklist
Revisit security package choices when threat models change, zero-trust requirements expand, or compliance frameworks require stronger identity controls.