Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Redirect service portal to main page after logout

Stephanie Rodr1
Kilo Contributor

Hi,

I have created multiple Service Portal for different customers, example customer A and customer B and I have the main Service Portal for internal.

Customer A: https://xxxx.service-now.com/A

Customer B: https://xxxx.service-now.com/B

Internal: https://xxxx.service-now.com/sp/?id=landing

 

The main login page url is "https://xxxx.service-now.com/sp/?id=landing" and I want everyone to login from this page. But when customer A or B login from "https://xxxx.service-now.com/sp/?id=landing" it redirect the customer to the correct page according to his company. As soon as customer A or B logout from their SP page they are redirected to :

Customer A: https://xxxx.service-now.com/A

Customer B: https://xxxx.service-now.com/B

And I do not want that, I want them to be redirected to "https://xxxx.service-now.com/sp/?id=landing".

If someone could help me with that, it would be much appreciated!

 

Thank you!

1 ACCEPTED SOLUTION

Omkar Mone
Mega Sage

Hi

Have a look at: System Definition - Installation Exits

 

You should edit 'Logout' or if you have MultiSSO enabled 'MultiSSORedirect'. 

 

You need to edit this Logout entry for that. Like if(user==A){

var gotoURL = "url of specific portal";

 

response.sendRedirect("logout_redirect.do?sysparm_url=" + gotoURL);

 

return true;}

 

Something like this .

 

 

Regards,

 

Omkar Mone.

www.dxsherpa.com

 

View solution in original post

4 REPLIES 4

Omkar Mone
Mega Sage

Hi

Have a look at: System Definition - Installation Exits

 

You should edit 'Logout' or if you have MultiSSO enabled 'MultiSSORedirect'. 

 

You need to edit this Logout entry for that. Like if(user==A){

var gotoURL = "url of specific portal";

 

response.sendRedirect("logout_redirect.do?sysparm_url=" + gotoURL);

 

return true;}

 

Something like this .

 

 

Regards,

 

Omkar Mone.

www.dxsherpa.com

 

Hi,

 

You can refer to below link:

 

https://community.servicenow.com/community?id=community_blog&sys_id=4a9c6ee1dbd0dbc01dcaf3231f96197c

 

Thanks,

Sumanth

Hey Sumanth,

 

I tried the link, but didn't work for me, maybe I was doing something wrong 😕

Great! Thank you Omkar, it worked 🙂