ASP.Net Identity EF Users Primary Key Change
Recently, I worked on converting a .Net API from a 3rd party authentication mechanism to internal and we chose to use the Identity framework. By default, Identity uses a string as the primary key for the AspNetUsers table and that was an issue because our current users table used a long (and there were a lot of foreign key references to it).
Fortunately, the Identity system is quite flexible and, with a few changes, allows for any primary key type. The following link describes how to accomplish this:
http://www.asp.net/identity/overview/extensibility/change-primary-key-for-users-in-aspnet-identity
It worked without any major problems, problems. However, since we were converting over an existing users database, we needed to manually set the EmailConfirmed and the SecurityStamp fields in SQL via:
UPDATE AspNetUsers SET SecurityStamp = NewID(),
EmailConfirmed=1