// startup.cs public void ConfigureServices(IServiceCollection services) { // .... services.AddIdentityCore<User, UserRole>() .AddEntityFrameworkStores<ApplicationDbContext>() .AddDefaultTokenProviders(); // Remember to add this line! // .... }