Identity allows you to configure the primary key. The official documentation covers the details with source code.
How to make an int field named UserID as the primary key in AspNetUsers table in Asp.Net Core 6.0 MVC
I am implementing Asp.Net Core Identity on an existing legacy website. I have created the Identity tables using migrations. The legacy database has a table named Users which was used for the logging. I have replaced the Users table with the AspNetUsers table. The legacy table had a field named UserID which was int as well as a primary key. I have modified the AspNetUsers table by adding a field named UserID of type int and moved all the rows from the Users table to the AspNetUsers table. The AspNetUsers table by default has ID field as the primary key which is a GUID. Is there a way to make the UserID the primary key in the AspNetUsers table?