If I have an app that will authenticate users using
ActiveDirectoy and will Authorize them and link data with them that are stored in Sql DB.
Which one is best practice ?
To import data repeatedly from AD and store in DB as (Id, UserName) and each time I'll authenticate I connect to AD and make sure its password is OK and them check the role from DB ?.
Keep authenticating from AD but get the GUID of the user and set as foreign key in DB tables ?
Both previous are not correct approach and there's another better solution ?
And what if the system should have the ability to have registered users from AD and registered users in
users table in DB ?