title: Active Directory and User Management
body: <p>I'm very new to LDAP and Active Directory and I'm probably understanding something completely wrong.</p>
  
  <p>I know ASP.NET Identity and forms authentication (however, I'm also quite new to that) and my question is actually if it is possible to use certain features you can use with forms authentication (explanation further below) with Active Directory.</p>
  
  <p>I'm building an MVC web application and I'd like to authenticate my users against Active Directory. That would be possible with ADFS. The template you get when using ASP.NET Identity in VS2013 uses passive authentication. Is it however possible to not do this redirect to the Active Directory domain but create a custom login page for the user?</p>
  
  <p>Is it also possible to do user management with Active Directory like that is possible with forms authentication? I was thinking about:</p>
  
  <ul>
  <li>A page where the user can register himself</li>
  <li>Ability for the user to change his password <em>(I know this is possible with ADFS, but the user may not be logged in. I want him to do this when he's logged in, with a self-made page.)</em></li>
  <li>Logging in on a new computer should ask for a code specified in an email</li>
  <li>Set up password policy in the application</li>
  <li>... <em>(Other things that I might have forgotten)</em></li>
  </ul>
  
  <p>When these things aren't implicitly possible with Active Directory, please advise on how to configure the application to acquire this functionality (when possible with Active Directory).</p>
  
  <p>Thank you very much in advance for helping me!</p>
  
  <p><strong>EDIT 1:</strong>
  To leave my question not too open, I maybe better just start with that custom login page. When I understand it well, the normal flow when using ADFS to authenticate your users against is:</p>
  
  <ol>
  <li>A user tries to access a web page of an application for which he needs to be authenticated</li>
  <li>(Passive) redirect to a login page provided by ADFS -> user enter his AD credentials</li>
  <li>ADFS returns token</li>
  <li>Token is sent to the web application (that ADFS trusts)</li>
  <li>When the web application thinks everything is ok, it stores an authentication cookie in the user's browser (I guess), and the user can access the web page</li>
  </ol>
  
  <p>What I would like:</p>
  
  <ol>
  <li>A user tries to access a web page of an application for which he needs to be authenticated</li>
  <li>Redirect to a login page of that same web application where the user can enter his credentials</li>
  <li>The entered credentials are sent to ADFS (I guess) and it returns something (a token?) with information about whether the login succeeded or not (This step could be preceded by a call to some (self-made) service (a Web API application) that multiple client applications could use for their authentication against the same directory)</li>
  <li>When the login succeeded, the web application stores a cookie in the user's browser and the user is able to access the page</li>
  </ol>
  
  <p>I don't know if that makes sense? I'm just wondering how companies that use Active Directory to store user information can still have a custom login page, registration page and other user management stuff. (Or don't they use AD but do they just have their own databases?)</p>