none
Automatic login from web application to OWA 2010

    Question

  • I am trying to create a script in classic ASP, .NET or just plain javascript that enables my users to automaticly login into there Exchange 2010 OWA enviroment from our own web application. Without any real success so far...

    I have recreated the original login page by copying the source. Now with user credentials already filled a javascript automaticly submits the form to https://exchange-url/owa/auth.owa where exchange-url is the url of my exchange provider. The exchange server is in a hosted exchange enviroment, so I can't modify any source files on that server.

    The script:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    </head>
    
    <body>
    <form action="https://exchange-url/owa/auth.owa" method="POST" name="logonForm" ENCTYPE="application/x-www-form-urlencoded">
    	<input type="hidden" name="destination" value="https://exchange-url/owa/">
    	<input type="hidden" name="flags" value="4">
    	<input type="hidden" name="forcedownlevel" value="0">
    	<input id="rdoPrvt" type="radio" name="trusted" value="4" class="rdo" checked><br>
    	<input id="username" name="username" type="text" value="my-username@domain.net" ><br>
    	<input id="password" name="password" type="password" value="mypassword">
    	<input name="isUtf8" type="hidden" value="1">
    	<button type="submit">Inloggen</button>
    </form>
    </body>
    </html>
    

    In Firefox this method does login the user but gives a javascript error. In IE I get a message stating my browser must enable cookies first, which is already enabled.

     PLEASE ADVISE!!

    Monday, May 10, 2010 7:57 AM

Answers

All replies

  • It does seem to partially work when I add target="_blank". The strange thing is that I first need to login to OWA en then Logout. When I run the script after that it works.

    But If I don't login and logout first it doesn't work!! It shows the login page and a message stating username and password are wrong. I've checked that and they are correct.

     


    Do until it's done
    Monday, May 10, 2010 11:56 AM
  • Form action needs to be: https://exchange-url/owa/auth/owaauth.dll

    Then everything works fine if not in a iframe.


    Do until it's done
    Wednesday, May 12, 2010 7:55 AM
  • I would be very interested in this if you could dumb it down for me.   Basically I'd like to set up my exchange server to autoload something to open OWA and login on boot up.  I could set up a user whose only purpose is to open owa and login.   The reason I'd like this is that on exchange 2010 the first person who logs into OWA, has to wait about a minute for login.   After that everyone else is fine.  
    Saturday, February 11, 2012 3:34 PM