SSO Login takes to logout page

mdash
Giga Guru

Hi,

In our IDP, when I put login URL as instance.service-now.com/navpage.do, after login it takes to Homepage with portal page in the content frame. 

We wanted to redirect SSO users to SP portal, so I changed the IDP login URL to instance.service-now.com/sp.
Now when the user logs in, it takes them to the SP portal logjn screen, not the SP portal Homepage. Even if I try to relogin from the portal, it loops back to the SP Portal Login page.

Strange this is, if I try Test Connection from the IDP, it lets user login and shows the SP portal homepage.

Has anyone faced this issue earlier?

Thanks

1 ACCEPTED SOLUTION

Miguel Donayre
ServiceNow Employee
ServiceNow Employee

Did you create new system properties that hold the urls?

If you did try commenting out the new code you entered in the script and enter this 

else if (this.redirectURL)

url = sppUrl;

Now that will always redirect to the portal.

 

View solution in original post

10 REPLIES 10

Steven Parker
Giga Sage

We use SSO for all of our users.  Non-Itil users are automatically redirected to the Service Portal when they go the ServiceNow using the following URL in the "ServiceNow Homepage" field of the IDP:

https://instancename.service-now.com/navpage.do

Are you trying to redirect ITIL users to the Service Portal on logon?


Please mark this response as correct and/or helpful if it assisted you with your question.
Steven

Hi Steven,

We want all SSO users to be redirected to SP portal after login. That's why I changed the url from navpage.do to SP, but it does not let in.

It looks like I need to stick to navpage.do as mentioned in various documents.

But for SSO users with sn_customerservice_customer role, it should redirect to the SP (or in my case CSM) portal, as it does for local logins. However, it just lets the user to the nav_to.do?uri=%2Fcsm%2F link.

Miguel Donayre
ServiceNow Employee
ServiceNow Employee

Hello @mdash 

I did this recently did something similar for a customer .

The redirect is done on a SSO script include- MultiSSO_SAML2_Update1

I had to set up 2 new system properties 

one for the base url - https://service-now.com = baseUrl

the 2nd one for is the portal url - https://service-now.com/sp = sppUrl

 

in the MultiSSO_SAML2_Update1 script in line 124 i added two new lines-  i set up variables that call those system properties

var baseUrl = gs.getProperty('glide.base.servlet.uri');

var sppUrl = gs.getProperty('glide.redirect_spp.servlet.uri');

at line 137 i commented out the old code and add the following code 

old code - 

else if (this.redirectURL)

url = this.redirectURL;

 

New code -

  • if(this.redirectURL==baseUrl){
  • url=sppUrl;
  • }else url=this.redirectURL;

So now when someone enters https://service-now.com they will always get redirected to the Home portal page after SSO. IF they are coming in from a email link, after SSO they get sent to that link not get redirected to the portal home page.

Modify it to what you need 

 

let me know if that helps out!