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 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).
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. 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.
Require authentication for a Service Portal page
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. 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 a portal as the instance login page
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
Redirect to Service Portal after login
Conditionally redirect users to a Service Portal page after logging in.
Before you begin
Role required: admin
Procedure
What to do next
To debug redirection, see Debug Service Portal URL redirects. For additional redirection troubleshooting information, see the Frequently Asked Questions on redirection with service portal [KB0747432] article in the Now Support Knowledge Base.
Debug Service Portal URL redirects
Debug the URL redirects for logging in to Service Portal and redirecting to the first page.
- Make sure the system property glide.entry.first.page.script has the value:
new SPEntryPage().getFirstPageURL(). - From the SPEntryPage script include, set
this.logVariables = true. - In a separate browser, log in.
- From the system navigator, view the log output by navigating to .