1

We have a custom home.aspx page located at https://sharepoint/_login/home.aspx?ReturnUrl=/_layouts/15/Authenticate.aspx?Source=%2F&Source=/#

In the home.aspx page, it basically says if internal AD, use Windows Auth and use this default.aspx

//get full URL
fullDomain = window.location;
//split URL at ?    
returnURL = String(fullDomain).split("?");

newURL = "/_windows/default.aspx?" + String(returnURL[1]);
//Redirect browser to the new URL
window.location.replace(newURL);

If it's one of four orgs, use SAML auth and use a different default.aspx

//build new URL for SAML Authentication
newURL = "/_trust/default.aspx?" + String(returnURL[1]);
//Redirect browser to the new URL
window.location.replace(newURL);

This /_trust/default.aspx page contains this:

<%@ Assembly Name="Microsoft.SharePoint.IdentityModel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=11d7bda222f9425d" %> 
<%@ Import Namespace="Microsoft.SharePoint.IdentityModel.Pages" %> 
<%@ Page Language="C#" Inherits="Microsoft.SharePoint.IdentityModel.Pages.TrustedProviderSignInPage" Debug="false"  %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
</head>
<body>
</body>
</html>

When a user clicks one of those four orgs, they're redirected to the respective IDP and to authenticate. What I'm trying to do is modify the URL to one of those IDPs as it has changed, but what I'm not really understanding is where/how SP knows where it should redirect the user as I'm not seeing where that could be configured.

I'm sure there's more info I can try to provide on request. I'm not the person that created & implemented this, so kinda struggling. Any help would be appreciated!

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.