title: How do you automatically Login to OWA 2013 using HTML + JavaScript
body: <p>We used to use Exchange 2007 and the HTML + JavaScript below to log into OWA 2007 automatically.</p>
  
  <p>But we've now upgraded to Exchange <strong>2013</strong> and the script no longer works. It displays <strong>404 - File or directory not found.</strong>
  I've asked our Infrastructure department if the owaauth.dll file is still in the same location, and they have told me it's moved to:</p>
  
  <pre><code>https://" + server + "/exchweb/auth/owaauth.dll
  </code></pre>
  
  <p>I changed the script to use the new path, but I still get the <code>404 - File or directory not found</code> error.</p>
  
  <p>My question is what do I need to change in the script to make it work with Exchange 2013?</p>
  
  <p><strong>Here are the Exchange 2007 script details</strong></p>
  
  <p><a href="http://blogs.msdn.com/b/vikas/archive/2009/06/03/howto-automatically-login-to-owa-2007-using-html-javascript.aspx" rel="nofollow">HOWTO: Automatically Login to OWA 2007 using HTML + JavaScript</a></p>
  
  <pre><code>&lt;script&gt;
  function LoginToOWA (server,domain,username,password) {
  
  
    var url = "https://" + server + "/exchweb/bin/auth/owaauth.dll";
    var p = {destination:'https://' + server + '/exchange',flags:'0',forcedownlevel:'0',trusted:'0',isutf8:'1',username:domain + '\\' + username,password:password};
  
  
    var myForm = document.createElement("form");
    myForm.method="post" ;
    myForm.action = url ;
  
    for (var k in p) {
  
      var myInput = document.createElement("input") ;
      myInput.setAttribute("name", k) ;
      myInput.setAttribute("value", p[k]);
      myForm.appendChild(myInput) ;
    }
  
  
    document.body.appendChild(myForm) ;
    myForm.submit() ;
    document.body.removeChild(myForm) ;
  }
  &lt;/script&gt;
  
  &lt;body onload="javascript:LoginToOWA('owa.exchange.com','domain','username','password');"&gt;
  &lt;h3&gt;Please wait while redirecting to OWA...&lt;/h3&gt;
  &lt;/Body&gt;
  </code></pre>