Product documentation Docs
    • English
    • Deutsch
    • 日本語
    • 한국어
    • Français
  • More Sites
    • Now Community
    • Developer Site
    • Knowledge Base
    • Product Information
    • ServiceNow.com
    • Training
    • Customer Success Center
    • ServiceNow Support Videos
  • Log in

Product documentation

  • Home
How search works:
  • Punctuation and capital letters are ignored
  • Special characters like underscores (_) are removed
  • Known synonyms are applied
  • The most relevant topics (based on weighting and matching to search terms) are listed first in search results
Topics are ranked in search results by how closely they match your search terms
  • A match on the entire phrase you typed
  • A match on part of the phrase you typed
  • A match on ALL of the terms in the phrase you typed
  • A match on ANY of the terms in the phrase you typed

Note: Matches in titles are always highly ranked.

  • Release version
    Table of Contents
    • Now Platform capabilities
Table of Contents
Choose your release version
    Home New York Now Platform Capabilities Now Platform capabilities Service Portal Service Portal security Single sign-on, logins, and URL redirects

    Single sign-on, logins, and URL redirects

    • Save as PDF Selected topic Topic & subtopics All topics in contents
    • Unsubscribe Log in to subscribe to topics and get notified when content changes.
    • Share this page

    Single sign-on, logins, and URL redirects

    Service Portal uses a combination of system properties and script includes to determine how the system handles URL redirects for users logging in to the portal.

    Only users who understand SSO, URL redirects, and the ServiceNow platform should make any changes.

    Single sign-on and Service Portal

    To use single sign-on with Service Portal, you must enable the Integration - Multiple Provider Single Sign-On Installer plugin (com.snc.integration.sso.multi.installer).

    If you are using the system property to automatically redirect to your primary IdP, then Service Portal automatically redirects to that IdP. If you have multiple identity providers, Service Portal shows a link on the login page to Use external login. For more information on SSO and authentication in the platform, see Multiple-Provider single sign-on (SSO).

    Require authentication for a Service Portal page

    If you want to require authentication for a Service Portal page, ensure that the Public flag on the page record is not selected. For more information, see Create and edit a page using the Service Portal Designer. If a user navigates to a non-public page, they are redirected to the login page for the requested portal.

    Because every page request is routed through the $sp page, this page must be public. The following values in the Public Pages sys_public table define the page as public:

    • Page: $sp
    • Active: true

    Configure the Service Portal login page

    Administrators can configure a login page URL redirect for a portal.

    1. Add a system property with the following settings:
      • Name: glide.entry.page.script
      • Type: string
      • Value:
        new SPEntryPage().getLoginURL()
    2. To customize the actual entry page, from the Script Includes table, search for SPEntryPage.
      Note: If you make changes to the script include, it won't be upgraded with future updates.
    3. Edit the script on the SPEntryPage to change the assigned portal to the portal_suffix you want. SPEntryPage uses /sp/ as the portal path to redirect to. Enter your own portal_suffix in place of sp.
      SPEntryPage Script Include with the this.portal = "/sp/"; section highlighted
      Note: The slash character (/) after /sp may cause issues when configuring single sign-on. If you're experiencing issues, try removing the character from the script.

    Redirect to Service Portal after login

    Use system properties and script includes to conditionally redirect users to a page after logging in.

    Follow these steps to redirect a user to Service Portal after they log in.

    1. In the sys_properties table, add the following property:
      Property Type Value Description
      glide.entry.first.page.script string new SPEntryPage().getFirstPageURL() First page after authentication
      getFirstPageURL primarily does the following:
      • Redirects to login_redirect.do in order to break out of the frameset (if there is one).
      • Redirects to Service Portal if the user has no roles, or the full platform for everyone else.
    2. Customize the after login behavior by navigating to the SPEntryPage script include.
      Note: If you make changes to the script include, it won't be upgraded with future updates.
      Note: If you are using external authentication, ensure that your IdP supports the RelayState URL parameter. This parameter retains the originally requested URL while the user authenticates, and is necessary for redirection after login.

    Debug Service Portal URL redirects

    Debug the URL redirects for logging in to Service Portal and redirecting to the first page.

    To view debug output from SPEntryPage and see the session variables it redirects based on:
    1. Make sure the system property glide.entry.first.page.script has the value: new SPEntryPage().getFirstPageURL().
    2. From the SPEntryPage script include, set this.logVariables = true.
    3. In a separate browser, log in.
    4. From the system navigator, view the log output by navigating to System Logs > System Log > All.

    Tags:

    Feedback
    On this page

    Previous topic

    Next topic

    • Contact Us
    • Careers
    • Terms of Use
    • Privacy Statement
    • Sitemap
    • © ServiceNow. All rights reserved.

    Release version
    Choose your release version

      Single sign-on, logins, and URL redirects

      • Save as PDF Selected topic Topic & subtopics All topics in contents
      • Unsubscribe Log in to subscribe to topics and get notified when content changes.
      • Share this page

      Single sign-on, logins, and URL redirects

      Service Portal uses a combination of system properties and script includes to determine how the system handles URL redirects for users logging in to the portal.

      Only users who understand SSO, URL redirects, and the ServiceNow platform should make any changes.

      Single sign-on and Service Portal

      To use single sign-on with Service Portal, you must enable the Integration - Multiple Provider Single Sign-On Installer plugin (com.snc.integration.sso.multi.installer).

      If you are using the system property to automatically redirect to your primary IdP, then Service Portal automatically redirects to that IdP. If you have multiple identity providers, Service Portal shows a link on the login page to Use external login. For more information on SSO and authentication in the platform, see Multiple-Provider single sign-on (SSO).

      Require authentication for a Service Portal page

      If you want to require authentication for a Service Portal page, ensure that the Public flag on the page record is not selected. For more information, see Create and edit a page using the Service Portal Designer. If a user navigates to a non-public page, they are redirected to the login page for the requested portal.

      Because every page request is routed through the $sp page, this page must be public. The following values in the Public Pages sys_public table define the page as public:

      • Page: $sp
      • Active: true

      Configure the Service Portal login page

      Administrators can configure a login page URL redirect for a portal.

      1. Add a system property with the following settings:
        • Name: glide.entry.page.script
        • Type: string
        • Value:
          new SPEntryPage().getLoginURL()
      2. To customize the actual entry page, from the Script Includes table, search for SPEntryPage.
        Note: If you make changes to the script include, it won't be upgraded with future updates.
      3. Edit the script on the SPEntryPage to change the assigned portal to the portal_suffix you want. SPEntryPage uses /sp/ as the portal path to redirect to. Enter your own portal_suffix in place of sp.
        SPEntryPage Script Include with the this.portal = "/sp/"; section highlighted
        Note: The slash character (/) after /sp may cause issues when configuring single sign-on. If you're experiencing issues, try removing the character from the script.

      Redirect to Service Portal after login

      Use system properties and script includes to conditionally redirect users to a page after logging in.

      Follow these steps to redirect a user to Service Portal after they log in.

      1. In the sys_properties table, add the following property:
        Property Type Value Description
        glide.entry.first.page.script string new SPEntryPage().getFirstPageURL() First page after authentication
        getFirstPageURL primarily does the following:
        • Redirects to login_redirect.do in order to break out of the frameset (if there is one).
        • Redirects to Service Portal if the user has no roles, or the full platform for everyone else.
      2. Customize the after login behavior by navigating to the SPEntryPage script include.
        Note: If you make changes to the script include, it won't be upgraded with future updates.
        Note: If you are using external authentication, ensure that your IdP supports the RelayState URL parameter. This parameter retains the originally requested URL while the user authenticates, and is necessary for redirection after login.

      Debug Service Portal URL redirects

      Debug the URL redirects for logging in to Service Portal and redirecting to the first page.

      To view debug output from SPEntryPage and see the session variables it redirects based on:
      1. Make sure the system property glide.entry.first.page.script has the value: new SPEntryPage().getFirstPageURL().
      2. From the SPEntryPage script include, set this.logVariables = true.
      3. In a separate browser, log in.
      4. From the system navigator, view the log output by navigating to System Logs > System Log > All.

      Tags:

      Feedback

          Share this page

          Got it! Feel free to add a comment
          To share your product suggestions, visit the Idea Portal.
          Please let us know how to improve this content

          Check any that apply

          To share your product suggestions, visit the Idea Portal.
          Confirm

          We were unable to find "Coaching" in Jakarta. Would you like to search instead?

          No Yes
          • Contact Us
          • Careers
          • Terms of Use
          • Privacy Statement
          • Sitemap
          • © ServiceNow. All rights reserved.

          Subscribe Subscribed Unsubscribe Last updated: Tags: January February March April May June July August September October November December No Results Found Versions Search preferences successfully updated My release version successfully updated My release version successfully deleted An error has occurred. Please try again later. You have been unsubscribed from all topics. You are now subscribed to and will receive notifications if any changes are made to this page. You have been unsubscribed from this content Thank you for your feedback. Form temporarily unavailable. Please try again or contact  docfeedback@servicenow.com  to submit your comments. The topic you requested does not exist in the release. You were redirected to a related topic instead. The available release versions for this topic are listed There is no specific version for this documentation. Explore products Click to go to the page. Release notes and upgrades Click to open the dropdown menu. Delete Remove No selected version Reset This field is required You are already subscribed to this topic Attach screenshot The file you uploaded exceeds the allowed file size of 20MB. Please try again with a smaller file. Please complete the reCAPTCHA step to attach a screenshot
          Log in to personalize your search results and subscribe to topics
          No, thanks Login