arshanapalli
Tera Contributor

Two changes to implement SSO(Single sign-on) in Service Portal:

1)Changed "$sp" page to inactive in "sys_public" table.

2)Review your SPEntryPage script, in line 69 of the Script Include record, there is a condition that looks for a user role as a control. On a base system you will see the following code defined:

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

The above code snippet is problematic as there is no variable user defined in SPEntryPage record. The condition will therefore never trigger. Service Now is well aware of this issue and will be addressing it in later releases of Helsinki and Istanbul.

This issue can be corrected by updating the Script Include from line 60 - 70 with the following code:

getFirstPageURL: function() {

              var session = gs.getSession();

              this.logProperties('before', session);

              var check = session.getRoles();

              // has roles and is not a Service Portal page - go to UI16

              var nt = session.getProperty("nav_to");

              var isServicePortalURL = new GlideSPScriptable().isServicePortalURL(nt);

              var redirectURL = session.getProperty("login_redirect");

              if (check && !redirectURL && !isServicePortalURL)

                      return;

Version history
Last update:
‎02-13-2018 06:57 PM
Updated by: