---
sourceDocument: Australia ServiceNow AI Platform user interface
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/platform-user-interface

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia ServiceNow AI Platform user interface

ft:clusterId :

    - platux

bundleId :

    - platux

workflow :

    - Platform


---

# Single sign-on, logins, and URL redirects

# Single sign-on, logins, and URL redirects {#ariaid-title1}

* Release version: Australia
* 
* Updated April 22, 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 4 minutes to read

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 {#c_SPSSOLoginAndRedirects__section_fkk_4p3_xbb}

To use single sign-on with Service Portal, you must activate 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)](https://www.servicenow.com/docs/access?context=c_MultipleProviderSingleSignOn&version=australia&pubname=australia-platform-security&ft:locale=en-US).

You can configure the glide.service_portal.sso.early_redirect.portals system property to redirect users to the SSO Identify Provider (IdP) login page. This bypasses the portal login page. For more
information, see [Service Portal properties](https://servicenow-prod.fluidtopics.net/QVYg3EpZ_o55W~sA4PP8rw "Service Portal properties control aspects of the portal experience for admin and end users."). If your portal uses a customized version of the Login widget, you must update the sp_sso_early_redirection UI macro as needed to redirect users to the SSO Identify
Provider (IdP) login page without trying to load the portal page first.  
Note:  
Service Portal has a known issue related to using Multi-Provider SSO and Okta. For more information about this issue and a workaround, see the [Service Portal: After enabling Multi SSO, end users are able to access navpage.do through OKTA if they are already logged in \[KB0687717\]](https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0687717) article in the Now Support Knowledge Base.

## Require authentication for a Service Portal page {#c_SPSSOLoginAndRedirects__section_h35_zsd_rbb}

If you want to require authentication for a Service Portal page, confirm 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](https://servicenow-prod.fluidtopics.net/TbkBNc0cMK18ri_uRZxb5Q#t_ConfigureAPage "Create or edit a page and use layouts to organize the columns that house the widgets."). 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 <kbd class="ph userinput">sys_public</kbd>
table define the page as public:  
* Page: <kbd class="ph userinput">$sp</kbd>
* Active: <kbd class="ph userinput">true</kbd>
{#c_SPSSOLoginAndRedirects__ul_tkx_k3h_4w}

## Configure a portal as the instance login page {#ariaid-title2}

Direct all unauthenticated users to a portal login page to log in. The portal login page becomes the primary login page for your instance.

### Before you begin

Role required: admin

### Procedure

1. [Add a system property](https://www.servicenow.com/docs/access?context=t_AddAPropertyUsingSysPropsList&version=australia&pubname=australia-platform-administration&ft:locale=en-US) with the following settings:  
   * Name: glide.entry.page.script
   * Type: string
   * Value:

         new SPEntryPage().getLoginURL()

   {#c_SPLoginPage__ul_ayf_j22_v3b}
2. **Optional:** If you need to direct users to a portal other than the default portal, edit the portal specified in the SPEntryPage script include.  
   SPEntryPage uses the default portal on the instance as the portal path to redirect to. Employee Center (esc) is the default portal by default.  
   Note:  
   If you edit the script include, it won't be upgraded with future updates.
   1. Navigate to AllSystem DefinitionScript Includes.
   2. From the Script Includes \[sys_script_include\] table, search for a script include named SPEntryPage.
   3. In the Script field, edit the script to change the assigned portal to the portal_suffix you want.  
      For example, change `this.portal = this.getDefaultPortal();` to `this.portal = "/sp/";` to redirect to Service Portal.

          SPEntryPage.prototype = {

              initialize: function() {
                  this.logVariables = false; // for debugging
                  this.portal = this.getDefaultPortal(); // The URL suffix for default portal
              },

      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.
   {#c_SPLoginPage__substeps_jbl_xtq_f1c}
{#c_SPLoginPage__steps_e3j_322_v3b}

## Redirect to Service Portal after login {#ariaid-title3}

Conditionally redirect users to a Service Portal page after logging
in.

### Before you begin

Role required: admin

### Procedure

1. Enter `sys_properties.list` in the navigation filter.
2. In the System Properties \[sys_properties\] table, add the following properties and values.  
   {#t_RedirectToSPAfterLogin__table_sx1_5cn_sv__entry__4}

   | Property | Type | Value | Description |
   |-|-|-|-|
   | glide.entry.first.page.script | string | `new SPEntryPage().getFirstPageURL()` | First page after authentication |
   | glide.entry.page.script | string | Server script that redirects users to where to log in. For example: ` new SPEntryPage().getLoginURL()` | Contains the call to the server script include method that determines where to log in |
   [ ]

   {#t_RedirectToSPAfterLogin__table_sx1_5cn_sv}  
   getFirstPageURL primarily does the following:
   * Redirects to `login_redirect.do` to break out of the frameset (if there is one).
   * Redirects to the default portal if the user has no roles or to the full platform for users with roles who are not trying to go to a portal directly. When the user has no roles, they are redirected to the portal
     equivalent of a page. For example,

     https://\<instance_name\>.service-now.com/nav_to.do?uri=change_request_list.do

     sends users without roles to:

     https://\<instance_name\>.service-now.com/sp/?id=list\&table=change_request.
   {#t_RedirectToSPAfterLogin__ul_bz1_tkb_ftb}  
   Note:  
   This change does not prevent users without roles from accessing the full platform. To prevent users without roles from accessing the platform and always redirect to a portal, set the value of the glide.entry.loggedin.page_ess system property to the portal suffix, such as <kbd class="ph userinput">/sp</kbd>.
3. **Optional:** Customize the after-login behavior in the SPEntryPage script include.  
   For more information about modifying script includes, see [Script includes](https://www.servicenow.com/docs/access?context=c_ScriptIncludes&version=australia&pubname=australia-api-reference&ft:locale=en-US).  
   For example, if you want users with certain roles to be redirected to Service Portal, you could modify `user.hasRoles()` in the following code.

       if (user.hasRoles() && !redirectURL && !isServicePortalURL)

   Note:  
   * If you edit the script include, it won't be upgraded with future updates.
   * Users with the admin role always pass a `user.hasRoles()` check.
   * 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.
   {#t_RedirectToSPAfterLogin__ul_kh2_4mb_ftb}
{#t_RedirectToSPAfterLogin__steps_qtv_kkb_ftb}

### What to do next

To debug redirection, see [Debug Service Portal URL redirects](https://servicenow-prod.fluidtopics.net/VmxrYn58cvD8U0zbEd4Jkw#c_LoginRedirectDebugging "Debug the URL redirects for logging in to Service Portal and redirecting to the first page."). For
additional redirection troubleshooting information, see the [Frequently Asked Questions on redirection with service
portal \[KB0747432\]](https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0747432) article in the Now Support Knowledge Base.

## Debug Service Portal URL redirects {#ariaid-title4}

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 LogsSystem LogAll.
{#c_LoginRedirectDebugging__ol_csx_qtv_jw}

*[\>]: and then


