I've a group of employees whom use Outlook Web Access exclusively, and they are complaining that mailto: links on our intranet don't work for them because they don't open OWA (I can't change the settings on the individual machines, fyi).
I'm looking for some kind of way to have an intermediary page that I'll redirect them too when they click a mailto: link, which checks for an OWA login, and if it's found, will redirect the user to OWA. If no login is found, it will open a standard mailto: command.
MY PROBLEM: I can't seem to find a way to detect if they are logged into OWA. I can't use normal AJAX or Iframes because those elements are not allowed to inspect the contents of a page loaded from a different domain (our intranet is NOT on the same domain as OWA).
I even tried hitting the OWA url in code (C#) using the WebRequest class of System.Net, but I get a 400 error there for some reason.
I tried AJAX, IFrames and WebRequest against both the base URL of the OWA system, as well as the URL that you are redirected to for a login. All fail as described above.
Does anyone have a way of detecting an OWA login? I don't need to 'scrape' anything from a page in OWA, I just need a yes/no answer for if they are logged in or not.
Can you make a jsonp ajax request and just look at the 302 redirect url?
If you get redirected to
owa/auth/logon.aspx
, you are not logged in.Using jsonp will let you work around cross domain security limitations.