Frequently Asked Questions : Service Portal Redirection



  1. I configured spEntryPage to send non-roled users to my service portal but they are still able to access the platform UI. What did I do wrong?
    1. This is expected behavior. SPEntryPage will not make it impossible for a user to access UI16, it only ensures that by default they will reach the portal instead.
  2. When a user tries to navigate to a portal other than the default portal before logging in, they are redirected to the default portal after login. Why?
    1. This just a limitation in the product. The design of the SPEntryPage logic does not account for multiple portal login scenarios.
  3. After logging in and being properly redirected, users are able to access UI16 by opening a new tab and going to or by opening ServiceNow from the chicklet in Okta. How do I prevent this?
    1. This is expected behavior. The SPEntryPage script is currently only evaluated after a login operation is completed. If you need to restrict users from accessing the platform interface entirely please see the examples given in this arcticle.
  4. When opening a record link from an email, users are redirected to the platform interface after login. How can we send them to the service portal instead?
    1. If you are using SSO make sure that the relay state is being properly preserved by the IDP. If not, then double check that redirection is configured properly as described here.
  5. When a user logs out and then logs in again through the portal, they are redirected to the platform UI rather than the portal.
    1. When you log in to ServiceNow, the platform tries it’s best to redirect you to the page you were trying to visit before logging in. In some cases, this leads to unexpected results. When you log out, the last page you request is typically and because of that the system will redirect you to the platform since is not a service portal URL.
  6. How do I debug redirection in Service Portal?
    1. To view debug output from SPEntryPage and see the session variables it redirects based on:
      1. Make sure the system property has the value new SPEntryPage().getFirstPageURL().
      2. Open the SPEntryPage script include and find and set this.logVariables to true.
      3. In a different browser (or "incognito" or "inPrivate" session), log in.
  7. The log output can be viewed by navigating to System Logs > System Log > All or by going directly to:



Article Information

Last Updated:2019-08-02 20:45:31