Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
SSO Login and Redirection to a Service Portal - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • SSO Login and Redirection to a Service Portal
KB0784347

SSO Login and Redirection to a Service Portal


21495 Views Last updated : Oct 21, 2024 public Copy Permalink English (Original)
  • English (Original)
  • Japanese
KB Summary by Now Assist

Issue

There are two or more IdPs configured without a Auto-Redirect IdP configured.  You want to direct users to a certain service portal for SSO login using a URL that points to a service portal with an IdP sys_id defined in glide_sso_id, for example:

https://<instance_name>.service-now.com/test_sp/login_with_sso.do?glide_sso_id=8abf82b9dbf08414b9d31649489619d5

https://<instance_name>.service-now.com/test_sp2/login_with_sso.do?glide_sso_id=8abf82b9dbf08414b9d31649489619d5

Where the Service Portal URLs are test_sp and test_sp2.

But this does not direct users to these portals for login.

Release

Applies to any release.

Cause

This is not supported and will not work:

https://<instance_name>.service-now.com/test_sp/login_with_sso.do?glide_sso_id=8abf82b9dbf08414b9d31649489619d5

https://<instance_name>.service-now.com/test_sp2/login_with_sso.do?glide_sso_id=8abf82b9dbf08414b9d31649489619d5

login_with_sso.do does not support the deep link.

Resolution

You will need to go here instead:

https://<instance_name>.service-now.com/test_sp
https://<instance_name>.service-now.com/test_sp2

To configure the specific IdP to use, use this KB as a guide:

https://support.servicenow.com/kb_view.do?sysparm_article=KB0719767

In step 2. of the Resolution you can go ahead and comment out the line (data.default_idp = GlideProperties.get("glide.authenticate.sso.redirect.idp");), but also add this one just under it:

data.default_idp ='8abf82b9dbf08414b9d31649489619d5';

8abf82b9dbf08414b9d31649489619d5 is the sys_id of the IdP you want to use for the specific portal. You will apply this to both portals test_sp and test_sp2.

So later in the Client Controller script, 8abf82b9dbf08414b9d31649489619d5 will be the "c.data.default_idp":

if (!c.data.is_logged_in && c.data.multisso_enabled && c.data.default_idp) {
c.server.get({
action: "set_sso_destination",
pageURI: c.data.pageURI
}).then(function() {
$window.location = "/login_with_sso.do?glide_sso_id=" + c.data.default_idp;
});
}

You can add additional coding to the Server script if you need to make the redirection more selective or complex.


The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.