Microsoft.AspNetCore.Identity.EntityFrameworkCore 10.0.0-preview.6.25358.103

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/aee5e4080331553ea9dfb7fb388b6d72f715bf6a
59
Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore
ASP.NET Core Identity Service implementation based on ASP.NET Core Identity.
59
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
58
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
58
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
57
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
57
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
57
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.
57
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
56
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/70048beee894074e9718206a0017d9b080ee66ff
56
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.
55
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
54
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
54
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
54
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.
54
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/2e51a0b6eba74bdf02aee71944e973487937cb99
53
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. This package was built from the source at: https://github.com/aspnet/Universe/tree/244e037a222a7cd0a17feafb7f3a625fde40de97
53
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/fb4b5a21ebd67b31fff4ddf5c039181da504c932
53
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/39e0501ee91dcf2b9b885d647795184815fb0408
53
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/bd1e14b7d16b798de8a874189c89afed755a266c
52

.NET 10.0

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