Sunday, June 2, 2024
 Popular · Latest · Hot · Upcoming
187
rated 0 times [  192] [ 5]  / answers: 1 / hits: 5883  / 10 Years ago, mon, june 9, 2014, 12:00:00

We used to use Exchange 2007 and the HTML + JavaScript below to log into OWA 2007 automatically.



But we've now upgraded to Exchange 2013 and the script no longer works. It displays 404 - File or directory not found.
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:



https:// + server + /exchweb/auth/owaauth.dll


I changed the script to use the new path, but I still get the 404 - File or directory not found error.



My question is what do I need to change in the script to make it work with Exchange 2013?



Here are the Exchange 2007 script details



HOWTO: Automatically Login to OWA 2007 using HTML + JavaScript



<script>
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) ;
}
</script>

<body onload=javascript:LoginToOWA('owa.exchange.com','domain','username','password');>
<h3>Please wait while redirecting to OWA...</h3>
</Body>

More From » html

 Answers
1

Worked it out. Here's the new script that works with OWA 2013:



<script>
function LoginToOWA (server,domain,username,password,useremailaddress) {

var url = https:// + server + /owa/ + useremailaddress + /auth/owaauth.dll;
var p = {destination:'https://' + server + '/owa/#path=/mail',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) ;
}
</script>

<body onload=javascript:LoginToOWA('owa.exchange.com','domain','username','password','[email protected]');>
<h3>Please wait while redirecting to OWA...</h3>
</Body>

[#44699] Saturday, June 7, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
analiseb

Total Points: 252
Total Questions: 96
Total Answers: 106

Location: Singapore
Member since Sat, Jul 25, 2020
4 Years ago
;