title: How to connect your ASP.NET Core 3.1 MVC web application to Active Directory?
body: <p>I am building a web application for a client, where I will have to set it up on their Windows Server via IIS. I will have to integrate their base of users into my application via Active Directory (not Azure Active Directory). I have already included Windows authentication into my application and it seems to work on my local computer.</p>
  <p>What I want to know is:</p>
  <ul>
  <li><p>How to change the login prompt into my custom login page?</p>
  </li>
  <li><p>How to change the username of the authenticated user (right now when I sign in, I have to write down the name of the device and the name of the user. for example: _device/_user). What I want is for the user to simply be able to only write their username, not device name.</p>
  </li>
  <li><p>How to manage the access of the users, and how to add roles to them inside the application. Since the user is signed In. I now want to know how do I assign this user a certain role, so I can restrict access to certain pages based on that.</p>
  </li>
  </ul>
  <p>I have been looking through some documentation but not much is mentioned about Active Directory integration or the questions that I have listed above.</p>