OWA – Silent Redirection to Office365

If a user’s mailbox is in Office 365, the CAS server issues a redirect to Office 365 when the user has successfully authenticated. By default, it pops up a nuisance, interstitial page that requires an extra click (and can turn into a black hole),
This is avoided by adding the following code to C:/Program Files/Microsoft/Exchange Server/V14/ClientAccess/Owa/casredirect.aspx immediately above the line <!DOCTYPE HTML…

<%
if (RedirectionUrl.Contains(“http://outlook.com/owa”)) {
Response.Redirect(RedirectionUrl);
Response.End();
}
%>

You need to do this every time there is an update to the Exchange software.