title: Oauth 2 token for Active Directory accounts
body: <p>I have used Owin in the past to create a token endpoint in my Mvc Web Api projects to provide oauth 2.0 tokens with &quot;<a href="https://www.rfc-editor.org/rfc/rfc6749#page-9" rel="nofollow noreferrer">Resource Owner Password Credentials</a>&quot; <em>grant type</em> where access token provider would check a database user table to verify the validity of the credentials supplied by the mobile client (multiplatform App developed with Visual  studio tool for Cordova).</p>
  <p>In this project, the Web Api will be consumed by a multiplatform Mobile app used by <strong>Active Directory Windows domain accounts</strong></p>
  <p>I would like to use Owin Oauth 2.0 to grant an Access Token to these users but I don't know how to check the validity of these credentials.</p>
  <p>What I was thinking is to put the <code>/token</code> endpoint behind <code>&quot;basic authentication&quot;</code> and in the code of the Access Token Provider get the user from the Identity that, in case of authenticated used, should be automatically created by the Asp.net pipeline.</p>
  <p>Is it something that could work?</p>
  <p>Do you know any better idea to use Oauth 2.0 for AD Windows Accounts?</p>
  <p><em>Note:</em></p>
  <p>I'm also investigating if Active Directory is able to provide an Oauth 2.0 endpoint by itself.</p>