Skip to content

ASP.NET Core Identity is not finding users via email after migrating from K13 #554

@maciejdoboszadhd

Description

@maciejdoboszadhd

Brief bug description

After migrating users from Kentico 13 → Xperience by Kentico using the Xperience Migration Tool, users appear correctly in the CMS_User table, but ASP.NET Core Identity is unable to locate them using UserManager.FindByEmailAsync().
FindByEmailAsync() consistently returns null, even though the user record exists in the database with the correct email.

Output logs

protocol20251124_0827.txt

Repro steps

  1. Migrate a Kentico 13 instance to Xperience by Kentico using the official migration tool.
  2. Verify that users exist in the CMS_User table with correct values (including Email).
  3. Configure ASP.NET Core Identity and the default Kentico ApplicationUserStore.
  4. Attempt to authenticate a migrated user (note: migrated user was marked as external in Kentico 13).

Application attempts:
var user = await userManager.FindByEmailAsync(email);

FindByEmailAsync() returns null, and sign-in fails.

Inspecting the database shows the user is present and the email matches exactly.

Expected behavior

UserManager.FindByEmailAsync() should successfully locate users migrated from Kentico 13, using the email stored in the CMS_User.Email column.
Users should be recognized by the Identity system without requiring additional manual intervention or re-saving user records post-migration.
Email fields should be properly mapped and normalized by the Xperience-provided ApplicationUserStore.

Test environment

Platform/OS: Windows 11, .NET 8
Browser: Chrome 129
Xperience by Kentico version: 30.10.1
Migration Tool version: 3.16.0

Additional context

That's how my ASP.NET Core Identity has been configured

services.AddIdentity<ApplicationUser, NoOpApplicationRole>(options =>
{
         options.SignIn.RequireConfirmedAccount = false;
})
.AddUserStore<ApplicationUserStore<ApplicationUser>>()
.AddRoleStore<NoOpApplicationRoleStore>()
.AddUserManager<UserManager<ApplicationUser>>()
.AddSignInManager<SignInManager<ApplicationUser>>()
.AddDefaultTokenProviders();`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions