ASP Net Core - Mixing an External Identity Provider with Separate User Accounts for Audit Tracking

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.

+1
source share
1 answer

No additional steps are required to associate user information with user from an external identity provider. It should look the same for a web application.

, . , , AspNetUserLogins. , , - :

enter image description here

+1

All Articles