logo

NJP

Bypassing SSO in the Customer Service Portal

Import · Mar 06, 2019 · article

It's bothered me for a while that when using SSO with the glide.authenticate.sso.redirect.idp property set, that the Customer Service portal was forced into the redirect as well. I have yet to see a Customer Service implementation where the external users are managed in any way other than the local ServiceNow accounts for authentication. I've spent some time researching and was unable to find a solution in the docs, in HI, or in the community so I started looked at the records involved.

What I found is that in the Customer Service portal, '/csm', the login button on the portal page is hard coded into the header. In the default CSM portal, the theme 'Customer Service' has the header widget 'CSM Stock Header' defined. In this widget, the login button is coded. This widget instance 'login-modal-customerservice' is called by the header widget and defines the usage of this widget for this instance. It's in the widget instance that you can bypass the sso.

If you look in the Server Script of the widget, you can see towards the bottom the line: 'var bypass_sso = options.bypass_sso == "true";' (note that true is in quotes).

This means that in the widget instance 'login-modal-customerservice', if you change the Additional options from:

{
  "show_panel":true
}

to:

{
  "show_panel":true,
  "bypass_sso":"true"
}

The login modal for /csm will no longer redirect to the SSO.

View original source

https://www.servicenow.com/community/csm-articles/bypassing-sso-in-the-customer-service-portal/ta-p/2297190