title: Esri Javascript - HttpGet call on a Windows AD authentication application with .net API
body: <p>I need to make an API call to my .NET 4.5.1 application that uses Windows AD for authentication.  Making the call via Dojo/Request and Esri/Request, I am returned with a UNAUTHORIZED response code.  I need to find the correct syntax for passing Username and Password to an API endpoint which uses Windows AD.</p>
  <p>esri/Request (returns UNAUTHORIZED):</p>
  <pre><code>  var requestHandle = esriRequest({
       &quot;url&quot;: &quot;https://myWindowsADwebsite.net/api/contact/get&quot;}, 
           {headers : {&quot;Username&quot;: &quot;myUser&quot;, &quot;Password&quot;: &quot;myPass&quot; }
     });
   requestHandle.then(this.requestSucceeded, this.requestFailed);
  </code></pre>
  <p>Dojo/Request (returns UNAUTHORIZED):</p>
  <pre><code>request(&quot;https://myWindowsADwebsite.net/api/contact/get/&quot;, {
               headers: {
              &quot;Username&quot;: &quot;myUser&quot;,
              &quot;Password&quot; : &quot;myPass&quot;
          }
  </code></pre>
  <p>There is a way to pass credentials to a Windows AD endpoint, but it is not via the headers based on what I have tested.  All help is appreciated.</p>