by Andreas

OWA in an iFrame – yes, it’s possible

imageMicrosoft is very clear on one thing when it comes to showing OWA (Outlook Web App) in an iFrame: it is not supported, and you’re on your own (unless you’re using their Sharepoint web parts).

That doesn’t mean it can’t be done, and if you’re happy with the light version (no right-click support, no custom toolbar items and probably other missing features..) it can be done as easy as displaying the following HTML page in an iFrame:

<!DOCTYPE html>
<html xmlns="">

    function LoginToOWA(server, domain, username, password) {

        var url = "https://" + server + "/owa/auth/owaauth.dll";
        // flags 0 = full version, flags 1 = light weight mode
        var p = { destination: 'https://' + server + '/exchange', flags: '1', 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]);


<body onload="javascript:LoginToOWA('','yourdomain','','yourpassword');">
    <img src="../../gfx/loadingAnim.gif" /> Please wait while your inbox is loading...


The javascript function is called during the body onload event with the mail server url and logon credentials. That’s it, works like a charm!

Now, to make this work for the full version OWA and get the right click support and other features just make sure the web site is running on the same domain as your Exchange server. If your web site is hosted on, and your Exchange is running on you should be good to go – despite some console warning messages that so far haven’t proven to cause any issues for me at least. The only change to the above code is to set the “flags” attribute to 0 instead of 1, and this switches from “light mode” to “full mode” (see in-code comment).

by Njål

Outlook Web App 2010 Auto login

Microsoft Exchange Server 2010

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).

  <body style="display: none">
    <form action="" method="POST" name="logonForm" ENCTYPE="application/x-www-form-urlencoded" id="loginForm">
      <input type="hidden" name="destination" value="">
      <input type="hidden" name="username"  value="" >
      <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">
    <script type="text/javascript">

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.