title: Authentication with Azure AD from React JS app
body: <p>I have a front end application developed using React JS. I need to provide authentication for this application using Azure AD. I have a requirement of not redirecting to microsoft's login page while logging in. To acheive the same I have created a custom login page as part of my front end application. And on click of Login I am calling azure AD token endpoint using Resource Owner Password Credentials flow and thus I am passing username and password entered into my custom page for authentication. But when trying to call the post method to token endpoint I am getting an error as </p>
  
  <pre><code>Failed to load https://login.windows.net/&lt;tenant id&gt;/oauth2/token: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.
  </code></pre>
  
  <p>I tried setting Access-Control-Allow-Origin header also but got the same error.</p>
  
  <p>Please help me in fixing the same.</p>