Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to pass RelayState using "login_with_sso.do?glide_sso_id=" links?

MG Casey
Mega Sage

We are using the multiple provider single sign-on plugin.

I want to pass a return URL after sending my users to the correct SSO portal.

Example:

  1. Our ServiceNow instance is defaulted to SSO #1.
  2. However, if I provide users with a certain URL (a public UI Page), it sends them to SSO #2 using the "login_with_sso.do?glide_sso_id=#########" link.
    • how can I add a relayState parameter to that link to give to my identity provider?
1 ACCEPTED SOLUTION

MG Casey
Mega Sage

I finally figured this out for good. All the wiki needed was some examples.



Say you have this URL:


myinstance.service-now.com/knowledge_detail_rtsd.do?sysparm_articlenumber=KB0026349



To force a specific SSO login, all you have to do is add the "glide_sso_id" parameter to that URL, so it becomes:


myinstance.service-now.com/knowledge_detail_rtsd.do?sysparm_articlenumber=KB0026349&glide_sso_id=b18ef6234234234055343be3ee4c1



In the bolded part, just input the sys_id of the identity provider you want the user to be forced to log in with.


View solution in original post

11 REPLIES 11

Hi, does this work in portal? I'm not sure that I have that infinite loop issue described, but for me it doesn't work in portal at all, only platform.

ajs4
Tera Contributor

Hi @Chris Sanford1 

Does it worked for portal ?