How do I use Windows Authentication with users in database
<p>My main goal is using the Windows Authentication to query my custom Users table to use through the web application. I am not sure there is a conventional way of doing this.</p>

<p>I have a predefined Users table and Roles table in a SQL database. How do I use the <code>User.Identity.Name</code> to query this Users table and map all the tables data along with the roles to a <code>ApplicationUser</code> class that can be further used later in the intranet web application?</p>

<p>I was unable to find anything closely related to what I am after from reading tons of articles. I assume this will be done in the <code>Startup</code> class under <code>ConfigureServices</code> but am also unsure of that. I need the user to be looked up whenever they navigate to the site for the first time.</p>