locked
ADFS 4: Changing Display Order on Client Realm Discovery Page RRS feed

  • Question

  •  have a request to change the display order of the providers configured in an ADFS/SharePoint environment. 

    The ADFS logon pages have been customized using the PowerShell commands to change backgrounds and text, but the order the providers show don't look to have a way to set the order.

    Anyone know the PowerShell or other ADFS config commands to make these appear in a specific order?

    By Default Active Directory is last option, I want to make it first. 


    -Arvind Sindhu Enterprise Arch (Microsoft Technologies) Sapient.

    Wednesday, May 17, 2017 3:03 AM

Answers

  • Based on inputs from Pierre Audonnet [MSFT] on how to rename Active Directory with custom name onload.js, I was able to figure it out using Java Script 

    https://blogs.technet.microsoft.com/pie/2016/12/02/adfs-2016-change-the-active-directory-claim-provider-display-name-in-the-home-realm-discovery-page/

    Below is y working Edit of code:

    // begin 2016-01-17 customizations
    // HRD Page changed after upgrading to FBL of 2016
    //Check if we are in the HRD page
    if ( document.getElementById("hrdArea") ) {
    //debugger
        var strADCPName = "Corp Users" ;
        //Create an array of all claim provider trust section in the page
        var listAllSpanForIdp = document.getElementsByClassName("idpDescription float") ;
    //
    if(listAllSpanForIdp.length==4){
    var parent = document.createElement("div");
    document.getElementById("bySelection").append(parent);
    parent.append(listAllSpanForIdp[0].parentNode);
    parent.append(listAllSpanForIdp[1].parentNode);
    parent.append(listAllSpanForIdp[0].parentNode);
    }else if(listAllSpanForIdp.length==3){
    var parent = document.createElement("div");
    document.getElementById("bySelection").append(parent);
    parent.append(listAllSpanForIdp[0].parentNode);
    parent.append(listAllSpanForIdp[1].parentNode);
    }

    var inc;
        for (inc = 0; inc < listAllSpanForIdp.length; inc++) {

            if ( listAllSpanForIdp[ inc ].innerHTML == "<span class=\"largeTextNoWrap indentNonCollapsible\">Active Directory</span>" ) {
                //Change the HTML content of the matching section to the value specified in the strADCPName variable
                listAllSpanForIdp[ inc ].innerHTML = "<span class=\"largeTextNoWrap indentNonCollapsible\">"+ strADCPName +"</span>" ;
    //document.getElementById("bySelection").prepend(listAllSpanForIdp[inc].parentNode);
           }

        }
    }


    -Arvind Sindhu Enterprise Arch (Microsoft Technologies) Sapient.

    Monday, May 22, 2017 12:19 PM

All replies

  • There is no PS or config command to do this.

    Depending on your JavaScript skills, you may be able to do something along the line that @Pierre described here.

    Wednesday, May 17, 2017 6:30 PM
  • Based on inputs from Pierre Audonnet [MSFT] on how to rename Active Directory with custom name onload.js, I was able to figure it out using Java Script 

    https://blogs.technet.microsoft.com/pie/2016/12/02/adfs-2016-change-the-active-directory-claim-provider-display-name-in-the-home-realm-discovery-page/

    Below is y working Edit of code:

    // begin 2016-01-17 customizations
    // HRD Page changed after upgrading to FBL of 2016
    //Check if we are in the HRD page
    if ( document.getElementById("hrdArea") ) {
    //debugger
        var strADCPName = "Corp Users" ;
        //Create an array of all claim provider trust section in the page
        var listAllSpanForIdp = document.getElementsByClassName("idpDescription float") ;
    //
    if(listAllSpanForIdp.length==4){
    var parent = document.createElement("div");
    document.getElementById("bySelection").append(parent);
    parent.append(listAllSpanForIdp[0].parentNode);
    parent.append(listAllSpanForIdp[1].parentNode);
    parent.append(listAllSpanForIdp[0].parentNode);
    }else if(listAllSpanForIdp.length==3){
    var parent = document.createElement("div");
    document.getElementById("bySelection").append(parent);
    parent.append(listAllSpanForIdp[0].parentNode);
    parent.append(listAllSpanForIdp[1].parentNode);
    }

    var inc;
        for (inc = 0; inc < listAllSpanForIdp.length; inc++) {

            if ( listAllSpanForIdp[ inc ].innerHTML == "<span class=\"largeTextNoWrap indentNonCollapsible\">Active Directory</span>" ) {
                //Change the HTML content of the matching section to the value specified in the strADCPName variable
                listAllSpanForIdp[ inc ].innerHTML = "<span class=\"largeTextNoWrap indentNonCollapsible\">"+ strADCPName +"</span>" ;
    //document.getElementById("bySelection").prepend(listAllSpanForIdp[inc].parentNode);
           }

        }
    }


    -Arvind Sindhu Enterprise Arch (Microsoft Technologies) Sapient.

    Monday, May 22, 2017 12:19 PM