I created the default ASP Net Core MVC web application with separate user accounts. I added the UserID INT user field to the AspNetUsers table and linked this as a foreign key to all my other user tables so that I could keep track of which users inserted / updated records in my database. I did this because I prefer to use INT fields for primary keys. In this scenario, everything is working fine.
Now I’m thinking about using an external identity provider, such as Azure Active Directory, but I can’t understand how I would associate a user in Azure AD (or any other identity provider) with my local database tables in order to maintain user ID key constraints. Of all my research, I cannot find articles for this scenario.
How do I associate user information with an external identity provider with my local database tables? I'm worried that I might need to double user account management both in the external identity provider and in my local AspNet user tables in order to support foreign keys with my other user tables that seem crazy.
Maybe I missed something obvious or my approach is wrong, so if there is a better alternative to keep track of who did what in my database tables for the ASP Net Core web application using an external identity provider, I would gladly accepted it.
source
share