How to update MultiSSOv2_SAML2_custom to send a new value to Identity Provider

MS12
Kilo Sage

I want to send login_hint from the login page to Okta along with the SSO url.

Found this kb article about customising  MultiSSOv2_SAML2_custom script include.

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0778203

 

But which method is used during login and how does one add a parameter to this list?

I modified loginUser method and added login_hint as shown below. But obviously its wrong. It doesn't change anything. I'm doing trial and error at this point. Wanted to see if anyone has done it before.

Came across another post with same question but no answers.

 

Also we have two IDPs - OKTA and Azure. My goal is after I create a custom script that works, I will be creating a new script include for Okta and pointing it to this one and leave the Azure one alone. In my head it should work. But not yet there to verify my theory.

If anyone has any inputs to script update and/or updating IDP provider with custom script, please let me know. Thanks!

 

loginUser: function(subjectUserName) {
       //var eventLogParm1 = "user_name=" + subjectUserName;
       var eventLogParm1 = "user_name=" + subjectUserName+ "login_hint="+subjectUserName;
        var respType = this.SAML2.isIdPInitiated() ? "IdP" : "SP";
        var eventLogParm2 = "initiator=" + respType + ",multisso=true,idpsysid=" + this.propGR.getUniqueValue();
        var userField = this.propertiesGR.user_field;
        
.
.
code omitted
.
.

       
    },
1 REPLY 1

MS12
Kilo Sage

We engaged with ServiceNow professional services to find a solution for this and decided not to pursue due to cost. So short answer I still don't know how to do this and it is not an easily customizable change.