How to redirect specific users to a portal upon accessing ServiceNow instance

pascalfrencken
Mega Sage

On our instance we have two groups of users, both of which authenticate via SSO:

  1. Our internal users authenticate via Azure AD and are automatically signed in to ServiceNow
  2. We now plan to add external users who will authenticate via a third-party identity provider (IdP) and then need to be redirected to the Customer Service Management (CSM) portal

For #2 we have the SSO with the third-party IdP working. To redirect these users to the CSM portal, we've added the system property glide.entry.first.page.script and created a script that detects whether the user logged in via the third-party IdP. This script then redirects the browser to the CSM portal.

This works fine upon the first login, but if the user keeps the browser session open and tries to access our ServiceNow instance again, the external logout page is shown instead. Likely because the script in glide.entry.first.page.script is not called since no SSO is taking place, as the user is already logged in.

How can we get external users automatically redirected to the CSM portal, regardless of whether they login the first time or whether they kept their browser open and accessed it a second time?

Regards,
Pascal Frencken
Signify, The Netherland

7 REPLIES 7

ok on this other portal is the link to your ServiceNow just https://<your instance name>.service-now.com?

No, the link is an SSO link of the IdP (https://<third party portal>.net/saml-sso-redirect.html?tenantName=vap&defName=SNOW). But the ServiceNow homepage, entity ID and audience URI in the SSO configuration indeed are set to our instance URL https://<instance name>.service-now.com.

Is there a reason the link is not to ServiceNow URL?  ServiceNow should be able to redirect to the IDP for verification and then back to itself.  Then you could put the link as https://<instance name>.service-now.com/<portal name>