As Code Name Jack mentioned, it was because of using Services.AddIdentity instead of Services.AddIdentityCore Note that you need to add role entity manually using Services.AddRoles<TRole>()when using identity core
Services.AddIdentity
Services.AddIdentityCore
Services.AddRoles<TRole>()