Microsoft.AspNetCore.Identity.EntityFrameworkCore 10.0.0

About

Microsoft.AspNetCore.Identity.EntityFrameworkCore utilizes Entity Framework Core to provide functionality enabling the storage of user, role, and other identity-related data in a database.

Key Features

  • Provides user and role management
  • Enables secure authentication and authorization mechanisms
  • Allows storage and validatation of user passwords using hashing
  • Tracks email confirmation for user account validation
  • Tracks two-factor authentication to provide an extra layer of security
  • Tracks failed login attempts to help protect against brute-force attacks enabling locking out user accounts after multiple failed login attempts
  • Uses claims to define fine-grained access control policies
  • Seamlessly integrates with Entity Framework Core for data storage and retrieval

How to Use

To use Microsoft.AspNetCore.Identity.EntityFrameworkCore, follow these steps:

Installation

dotnet add package Microsoft.AspNetCore.Identity.EntityFrameworkCore

Configuration

Add the following code to the Program.cs of your ASP.NET Core app:

builder.Services.AddDbContext<ApplicationDbContext>(options =>
    options.UseSqlServer(builder.Configuration.GetConnectionString("DefaultConnection")));

builder.Services.AddDefaultIdentity<ApplicationUser>()
    .AddEntityFrameworkStores<ApplicationDbContext>();

You can replace ApplicationDbContext with your own database context class derived from IdentityDbContext and ApplicationUser with your own user class containing additional properties derived from IdentityUser.

Make sure to configure the connection string via "ConnectionStrings:DefaultConnection" (or whatever you rename it to) so it can connect to your database.

Main Types

The main types provided by Microsoft.AspNetCore.Identity.EntityFrameworkCore include:

  • IdentityDbContext: Provides the database context for storing and managing user, role, and other identity-related data
  • IdentityUserContext: Provides methods and properties for querying and manipulating user information
  • RoleStore: Provides methods for creating, updating, and deleting roles, as well as querying and managing role-related data
  • UserStore: Provides methods for creating, updating, and deleting users, as well as querying and managing user-related data
  • UserOnlyStore: Provides methods for creating, updating, and deleting users, as well as querying and managing user-related data for users without roles

Additional Documentation

For additional documentation and examples, refer to the official documentation on ASP.NET Core Identity.

Feedback & Contributing

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

Showing the top 20 packages that depend on Microsoft.AspNetCore.Identity.EntityFrameworkCore.

Packages Downloads
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/cf2c5c9c6dca430b97aa96429b84d0da07eb77f1
69
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/67acc3d331454956fc06d6de2218a625e3e596f8
68
Microsoft.AspNetCore.All
Provides a default set of APIs for building an ASP.NET Core application, and also includes API for third-party integrations with ASP.NET Core. This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
68
Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore
ASP.NET Core Identity Service implementation based on ASP.NET Core Identity.
68
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/68bb6fb08f8f85bb3cf08953a0d2f4a254eaccff
67
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/aee5e4080331553ea9dfb7fb388b6d72f715bf6a
65
Microsoft.AspNetCore.All
Provides a default set of APIs for building an ASP.NET Core application, and also includes API for third-party integrations with ASP.NET Core. This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
65
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/509f6badec2f3162f0e50330cd9107e5624b379b
64
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/febee99db845fd8766a13bdb391a07c3ee90b4ba
64
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/fe4f0d09305ca73aa19976b4521e5c4e223b080e
64
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/c5f85986e62dabfc0b7f2f2a45dc7c22e8ac815f
63
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/e71b34dbb2c0883145c658bed8814ae45f6fe15e
63
Microsoft.AspNetCore.All
Microsoft.AspNetCore.All
63
Microsoft.AspNetCore.All
Provides a default set of APIs for building an ASP.NET Core application, and also includes API for third-party integrations with ASP.NET Core. This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
63
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/f6897a5bb7ca767df8eb465bf15b193c878fffbf
62
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/25bd01f17d5f01fc78bea5eb5308b2c0d79e2889
62
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/55738ff96b832439076e25584cfe0eb3bace9b01
62
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/c0ae1d179dba6f3acd0e55be55718c97c9028698
62
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/5502cf46706a25c39ce78a57b9191714c0eb40c2
62
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/d827c653b787c07de908240b7746ce34d3e6271e
62

Version Downloads Last updated
10.0.0 6 11/17/2025
10.0.0-rc.2.25502.107 10 10/15/2025
10.0.0-rc.1.25451.107 14 09/11/2025
10.0.0-preview.7.25380.108 15 08/14/2025
10.0.0-preview.6.25358.103 17 07/16/2025
10.0.0-preview.5.25277.114 23 06/11/2025
10.0.0-preview.4.25258.110 23 05/13/2025
10.0.0-preview.3.25172.1 21 04/16/2025
10.0.0-preview.2.25164.1 25 03/21/2025
10.0.0-preview.1.25120.3 29 02/25/2025
9.0.11 8 11/13/2025
9.0.10 8 10/15/2025
9.0.9 14 09/13/2025
9.0.8 16 08/05/2025
9.0.7 15 07/12/2025
9.0.6 19 06/14/2025
9.0.5 28 05/15/2025
9.0.4 20 04/14/2025
9.0.3 25 03/11/2025
9.0.2 24 02/16/2025
9.0.1 34 01/19/2025
9.0.0 45 11/13/2024
9.0.0-rc.2.24474.3 46 10/10/2024
9.0.0-rc.1.24452.1 46 09/17/2024
9.0.0-preview.7.24406.2 38 08/13/2024
9.0.0-preview.6.24328.4 46 07/10/2024
9.0.0-preview.5.24306.11 54 06/13/2024
9.0.0-preview.4.24267.6 36 06/21/2024
9.0.0-preview.3.24172.13 54 04/13/2024
9.0.0-preview.2.24128.4 45 03/14/2024
9.0.0-preview.1.24081.5 46 03/06/2024
8.0.22 4 11/11/2025
8.0.21 8 10/15/2025
8.0.20 17 09/12/2025
8.0.19 15 08/05/2025
8.0.18 19 07/12/2025
8.0.17 19 06/13/2025
8.0.16 29 05/15/2025
8.0.15 23 04/11/2025
8.0.14 26 03/11/2025
8.0.13 31 02/14/2025
8.0.12 34 01/20/2025
8.0.11 38 11/13/2024
8.0.10 50 10/10/2024
8.0.8 47 08/15/2024
8.0.7 44 07/10/2024
8.0.6 39 05/30/2024
8.0.5 52 05/14/2024
8.0.4 46 04/09/2024
8.0.3 39 03/12/2024
8.0.2 49 02/22/2024
8.0.1 48 01/14/2024
8.0.0 61 11/17/2023
8.0.0-rc.2.23480.2 57 10/20/2023
8.0.0-rc.1.23421.29 62 09/14/2023
8.0.0-preview.7.23375.9 69 08/23/2023
8.0.0-preview.6.23329.11 64 07/17/2023
8.0.0-preview.5.23302.2 62 06/20/2023
8.0.0-preview.4.23260.4 70 06/26/2023
8.0.0-preview.3.23177.8 61 06/28/2023
8.0.0-preview.2.23153.2 64 06/30/2023
8.0.0-preview.1.23112.2 58 07/02/2023
7.0.20 49 05/30/2024
7.0.19 48 05/14/2024
7.0.18 39 04/09/2024
7.0.17 46 03/14/2024
7.0.16 48 02/21/2024
7.0.15 41 01/14/2024
7.0.14 49 11/16/2023
7.0.13 60 10/27/2023
7.0.12 55 10/11/2023
7.0.11 49 09/14/2023
7.0.10 51 08/25/2023
7.0.9 64 07/24/2023
7.0.8 64 07/22/2023
7.0.7 57 07/09/2023
7.0.5 68 05/11/2023
7.0.4 59 06/04/2023
7.0.3 58 04/30/2023
7.0.2 68 01/20/2023
7.0.1 70 03/15/2023
7.0.0 63 01/03/2023
7.0.0-rc.2.22476.2 60 06/04/2023
7.0.0-rc.1.22427.2 59 06/29/2023
7.0.0-preview.7.22376.6 61 06/30/2023
7.0.0-preview.6.22330.3 71 06/30/2023
7.0.0-preview.5.22303.8 67 11/25/2022
7.0.0-preview.4.22251.1 68 05/20/2023
7.0.0-preview.3.22178.4 74 11/01/2022
7.0.0-preview.2.22153.2 66 07/08/2022
7.0.0-preview.1.22109.13 81 03/31/2023
6.0.36 44 11/13/2024
6.0.35 42 10/10/2024
6.0.33 38 08/13/2024
6.0.32 44 07/10/2024
6.0.31 51 05/30/2024
6.0.30 47 05/14/2024
6.0.29 45 04/09/2024
6.0.28 45 03/14/2024
6.0.27 48 02/22/2024
6.0.26 50 01/14/2024
6.0.25 57 11/17/2023
6.0.24 52 10/26/2023
6.0.23 54 10/20/2023
6.0.22 45 10/27/2023
6.0.21 54 08/24/2023
6.0.20 53 08/06/2023
6.0.19 61 08/21/2023
6.0.18 64 07/12/2023
6.0.16 65 05/25/2023
6.0.15 60 04/30/2023
6.0.14 63 04/30/2023
6.0.13 78 04/28/2023
6.0.12 67 02/13/2023
6.0.11 65 11/29/2022
6.0.10 72 10/17/2022
6.0.9 54 10/14/2022
6.0.8 69 08/30/2022
6.0.7 75 07/21/2022
6.0.6 83 07/13/2022
6.0.5 67 06/07/2022
6.0.4 73 10/02/2022
6.0.3 76 03/09/2022
6.0.2 78 02/11/2022
6.0.1 72 12/20/2021
6.0.0 66 11/09/2021
6.0.0-rc.2.21480.10 61 06/29/2023
6.0.0-rc.1.21452.15 65 03/01/2023
6.0.0-preview.7.21378.6 65 12/29/2021
6.0.0-preview.6.21355.2 68 07/17/2022
6.0.0-preview.5.21301.17 67 06/28/2023
6.0.0-preview.4.21253.5 66 10/17/2022
6.0.0-preview.3.21201.13 67 06/30/2023
6.0.0-preview.2.21154.6 62 12/26/2021
6.0.0-preview.1.21103.6 65 12/04/2022
5.0.17 63 03/17/2023
5.0.16 49 06/27/2023
5.0.15 52 07/07/2022
5.0.14 56 03/31/2023
5.0.13 64 12/26/2021
5.0.12 54 01/28/2023
5.0.11 54 11/01/2021
5.0.10 64 09/24/2021
5.0.9 56 05/21/2023
5.0.8 58 07/28/2021
5.0.7 56 03/02/2023
5.0.6 71 04/15/2023
5.0.5 59 03/21/2023
5.0.4 52 04/27/2023
5.0.3 258 02/15/2021
5.0.2 80 01/26/2021
5.0.1 62 05/13/2023
5.0.0 52 04/09/2023
5.0.0-rc.2.20475.17 64 06/14/2023
5.0.0-rc.1.20451.17 76 12/26/2021
5.0.0-preview.8.20414.8 61 11/12/2022
5.0.0-preview.7.20365.19 73 10/13/2022
5.0.0-preview.6.20312.15 64 06/24/2023
5.0.0-preview.5.20279.2 66 11/07/2022
5.0.0-preview.4.20257.10 61 12/26/2021
5.0.0-preview.3.20215.14 64 06/30/2023
5.0.0-preview.2.20167.3 63 12/03/2022
5.0.0-preview.1.20124.5 62 06/29/2023
3.1.32 66 04/17/2023
3.1.31 65 02/04/2023
3.1.30 67 02/20/2023
3.1.29 65 01/29/2023
3.1.28 63 10/10/2022
3.1.27 60 09/11/2022
3.1.26 58 05/04/2023
3.1.25 81 02/01/2023
3.1.24 70 03/29/2023
3.1.23 56 04/05/2023
3.1.22 57 01/23/2023
3.1.21 63 03/31/2023
3.1.20 56 12/26/2021
3.1.19 59 12/26/2021
3.1.18 52 01/20/2023
3.1.17 58 03/30/2023
3.1.16 52 06/11/2023
3.1.15 76 12/26/2021
3.1.14 66 12/26/2021
3.1.13 65 03/17/2023
3.1.12 54 03/19/2023
3.1.11 51 05/04/2023
3.1.10 53 02/23/2023
3.1.9 58 01/18/2023
3.1.8 63 04/15/2023
3.1.7 134 11/09/2020
3.1.6 70 02/20/2023
3.1.5 62 04/28/2023
3.1.4 68 01/24/2023
3.1.3 70 10/06/2022
3.1.2 61 12/26/2021
3.1.1 70 09/28/2022
3.1.0 61 12/26/2021
3.1.0-preview3.19555.2 64 06/26/2023
3.1.0-preview2.19528.8 64 05/03/2023
3.1.0-preview1.19508.20 74 12/26/2021
3.0.3 71 02/04/2023
3.0.2 64 02/17/2023
3.0.0 58 12/26/2021
3.0.0-rc1.19457.4 66 06/29/2023
3.0.0-preview9.19424.4 61 06/29/2023
3.0.0-preview8.19405.7 66 06/30/2023
3.0.0-preview7.19365.7 63 06/30/2023
3.0.0-preview6.19307.2 55 06/24/2023
3.0.0-preview5-19227-01 58 10/14/2022
3.0.0-preview4-19216-03 60 06/05/2023
3.0.0-preview3-19153-02 62 04/29/2023
3.0.0-preview-19075-0444 59 03/30/2023
3.0.0-preview-18579-0056 59 05/15/2023
2.3.0 37 01/20/2025
2.2.0 70 04/05/2023
2.2.0-preview3-35497 61 12/26/2021
2.2.0-preview2-35157 55 05/19/2023
2.2.0-preview1-35029 59 09/13/2022
2.1.6 71 04/05/2023
2.1.3 71 02/18/2023
2.1.2 66 05/07/2023
2.1.1 68 01/24/2023
2.1.0 66 04/01/2023
2.1.0-rc1-final 55 05/11/2023
2.1.0-preview2-final 58 05/08/2023
2.1.0-preview1-final 54 02/09/2023
2.0.4 71 10/06/2022
2.0.3 76 09/30/2022
2.0.2 67 04/20/2023
2.0.1 66 02/04/2023
2.0.0 58 01/24/2023
2.0.0-preview2-final 59 07/22/2022
2.0.0-preview1-final 60 03/22/2023
1.1.6 64 03/22/2023
1.1.5 69 04/01/2023
1.1.4 66 05/10/2023
1.1.3 66 12/26/2021
1.1.2 61 01/06/2023
1.1.1 60 11/21/2022
1.1.0 72 02/13/2023
1.1.0-preview1-final 80 09/09/2022
1.0.6 67 04/08/2023
1.0.5 65 04/02/2023
1.0.4 66 11/09/2022
1.0.3 52 05/01/2023
1.0.2 65 02/03/2023
1.0.1 59 04/02/2023
1.0.0 63 01/24/2023
1.0.0-rc2-final 54 03/15/2023