'login_with_sso.do' and relay state

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2020 07:38 AM
Some of our Service Portal pages are public and I am trying to set a relay state so users are redirected to the same page they were in after they hit the "login" button.
ServiceNow, using the "Login" widget, redirects the user to the following URL:
"/login_with_sso.do?glide_sso_id=<sys_id_of_your_default_idp>"
Does anybody know if it is possible to add any parameter to that URL so that the UI Page (login_with_sso) will pick it up and use it as the RelayState param for the SSO?
I have already checked old threads about this but unfortunately nothing worked as they were appending "/nav_to.do?uri=" to the URL, so you get the instance frame and everything displayed once you're redirected.
This works seamlessly within the tool, but as soon as you try to integrate the Service Portal with a SSO login it starts not being that easy.
EDIT:
I know I can modify the SSO Script that the Multi-Provider SSO plugin provides for authenticating and try to do the trick there. For this we need to identify when users come from the portal and then setting the relay state using the overridable method for it.
This workaround is not desirable as I guess it should be doable form the Login widget... only keeping that as a last resort if nothing else works.
EDIT2:
Just found that the script include SAML2_update1 explicitly prevents deep linking (or generating a Relay State) if the URL from which you're attempting to redirect the user to the SSO login page contains 'login_with_sso'.
Thanks in advance,
Jorge
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2020 07:41 AM
May this will help?
Please mark my response as correct and helpful if it helped solved your question.
-Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2020 07:43 AM
Hi Prateek,
Thanks for your reply but I don't see how this could be helpful. We would need to know exactly the name of the parameter that ServiceNow uses for setting the Relay State and unfortunately this UI Page is not even visible from within the instance... it will be difficult to achieve.
Cheers,
Jorge

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2020 07:46 AM
I know I can modify the SSO Script that the Multi-Provider SSO plugin provides for authenticating and try to do the trick there. For this we need to identify when users come from the portal and then setting the relay state using the overridable method for it.
This workaround is not desirable as I guess it should be doable form the Login widget... only keeping that as a last resort if nothing else works.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2020 10:36 AM
Instead of sending them to the login_with_sso page send them to the appropriate identity provider login with the appropriate relay state value.