Click here to Skip to main content
Licence CPOL
First Posted 28 Jul 2009
Views 12,682
Bookmarked 11 times

Direct OWA Login

By | 28 Jul 2009 | Article
Directly login in OWA interface bypassing the login screen.

Introduction

There are times when we need to redirect a user from one application to web mail access or OWA (Office Web Access) by bypassing the login screen of the OWA. Let me share a script and technique to do so.

Using the code

Here is the JavaScript function:

function DirectLogin (vstrServer, vstrDomain, vstrUsername, vstrPassword) {
          
      //var url = "https://" + server + "/exchweb/bin/auth/owaauth.dll";
      var strUrl = "https://" + vstrServer + "/exchweb/bin/auth/owaauth.dll";
      var strExchange = {destination:'https://' + vstrServer + 
         '/exchange',flags:'0',forcedownlevel:'0', 
         trusted:'0',isutf8:'1',username:vstrDomain + 
         '\\' + vstrUsername,password:vstrPassword};
                
      var myForm = document.createElement("form");
      myForm.method="post" ;
      myForm.action = url ;

      for (var varElement in strExchange) {
      
        var myInput = document.createElement("input") ;
        myInput.setAttribute("name", varElement) ;
        myInput.setAttribute("value", strExchange[varElement]);
        myForm.appendChild(myInput) ;
      }
          
      document.body.appendChild(myForm) ;
      myForm.submit() ;
      document.body.removeChild(myForm) ;
}

Here is the HTML:

<body onload="javascript:DirectLogin(‘servername','domain','username','password');">

In the above code snippet, there is a JavaScript method that actually bypasses the OWA login screen. Please note that the input to the scripts are very important, and also the path of the owaauth.dll file on the server that is set in the DirectLogin method.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Robin_Roy

Other
Brilliance Information Sdn Bhd
Malaysia Malaysia

Member

Working as a Senior Consultant with Brilliance MSC, Malaysia.
Love to evaluate new technologies and implement the same.
Believe in sharing knowledge.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
NewsA small bug & Thx PinmemberwaelElgayar9:49 15 Sep '10  
Questiondesktop version?? PinmemberTanmay Broachwala23:10 19 Aug '09  
AnswerRe: desktop version?? Pinmembersanong4:58 31 Jan '10  
QuestionVersion... PinmemberServerside1:24 28 Jul '09  
AnswerRe: Version... PinmemberRobin_Roy16:32 28 Jul '09  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120517.1 | Last Updated 28 Jul 2009
Article Copyright 2009 by Robin_Roy
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid