Outlook Web App 2010 Auto login
This one goes out to all my fans out there. A simple html page that automatically logs you in to Outlook Web App. Handy when webmail is the only thing you have access to, and you canstantly keep getting logged out (since your nazi sysadmin refuses to extend the session timeout period).
<html>
<body style="display: none">
<form action="https://exchangeserver.com/owa/auth/owaauth.dll" method="POST" name="logonForm" ENCTYPE="application/x-www-form-urlencoded" id="loginForm">
<input type="hidden" name="destination" value="https://exchangeserver.com/owa/">
<input type="hidden" name="username" value="joe@scrotum.org" >
<input type="hidden" name="password" value="Balls_1234$">
<input type="hidden" name="flags" value="4">
<input type="hidden" name="forcedownlevel" value="0">
<input type="radio" name="trusted" value="4" class="rdo" checked>
<input type="hidden" name="isUtf8" value="1">
</form>
<script type="text/javascript">
document.forms["logonForm"].submit();
</script>
</body> </html>
Replace action, destination, username & password. Save this file to your desktop etc. and create a shortcut/bookmark to it. You’re done.
This can also be used to facilitate one-click login into OWA from an intranet etc.

Very good!
Thanks a lot!
Sølve
fuckin brilliant
It’s working!
Thanks
This doesn’t work?
I created a blank html page with the codes above and changed the things inside you mentioned yet the file created opens up blank. with the address (file:///C:/Documents%20and%20Settings/….0
What’s the deal?
Some more explanation would be appreciated.
Regards,
Roy
Hi Roy
I updated the javascript part now – could you please try again?
You ROCK man! Thanks a lot!
Beautiful, updated code works like a charm
Thank You!
Hi,
I have a similar problem to Roy’s – the link is displaying correctly in IE but with a blank page. In Firefox, it displays the link as ‘file:///……’ with a blank page. In Comodo Dragon, it opens the login page but with blank username/password fields.
What might I be doing wrong
Could you pls help me? able to access the inbox with html but unable to do through my dot net application and it gives 400 bad request. The application uses framework 2.0 and was working fine for Exchange 2003, now I need to do the same for 2010.
Thanks in advance….
Hi,
This is a bit odd. Tried it again after last post above. Now works fine with Comodo Dragon, but still same problem with IE and Firefox!!
Email me the html file you’re trying to run and I’ll have a look
njal [a] degree . no
For those getting 400 error using .net use this user agent.
request.UserAgent = @”Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)”;
Hallo,
it doesn’t work for me. i have an owa with this detail Mit Microsoft Exchange verbunden
Geschützt durch Microsoft Forefront Threat Management Gateway
© 2009 Microsoft Corporation. Alle Rechte vorbehalten.… nothing happens.. can u hlp me pls?
Using MS- Outlook 2010, POP-Server is hosted on GoDaddy….
The script above appears to me (a non-script programmer) to solve an issue I have with (3) users sharing a single PC for email. By modifying the script’s user and password, and creating (3) ‘separate’ scripts one for each user, they would be able to log into the web secureserver.net and retrieve their ‘own’ email.
Assuming I am correct, how do I execute the script, after the user logs into the single PC??
I will create individual Window accounts for each of the users sharing the single PC.
Thanks in advance,
John B.
John: This is possible, but I’m not sure if it is a good/secure solution.
You can place a startup.bat file the users Startup folder which contains:
C:\Program Files\ (x86)\Internet Explorer\iexplore.exe c:\logonfile.html
Make sure the users dont have access to each others logonscript. You’ll also have a problem when a user changes his/hers password.
I would rather install Outlook, Thunderbird or Live Mail. Each user would still have their own account, they can choose to remember their password. It’s more secure, and will result in a better user experience.
/N
Is Forms Authentication in IIS required because when I run this script, I keep getting a poup asking for a username and password. This poup is blank too.
Thanks,
Mark
Mark: This is not required – and is caused by your IIS Settings. Check what user your App Pool is running under – and give this user access to the folder where OWA is running.
/N
This is great! I had spent some time trying to do this for Exchange 2010. And this helped me a lot. Thank you!
What about following the forward from a 2010 CAS to a 2007 mailbox? This form doesn’t seem to work with that – anybody else found a solution to this issue? It appears to be dependent on some cookies and referrer URL’s in order for this to happen.
Thanks!
Hi, this seems awesome, but I’m having an issue running it.
In the action section, I replaced your text with the login page for my school’s OWA. That url is https://email.uiowa.edu/owa/auth/logon.aspx?replaceCurrent=1&url=https%3a%2f%2femail.uiowa.edu%2fowa%2f. Then for the destination, I replaced you text with the url from when I am logged into my account. That one is https://email.uiowa.edu/owa/. This is not working with my username and password, it just takes me to the login page. Can you tell me if I’m using the wrong values for those?
Thanks,
Ben
Hi Ben – try this:
action: https://email.uiowa.edu/owa/auth/owaauth.dll
destination: https://email.uiowa.edu/owa/
Best regards, Njal
Hi James – I haven’t tried that.
Hit F12 in Chrome, inspect carefully the data/cookies that is sent – and try to replicate it. Good luck!
Best regards, Njal