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 ITIL users to Platform UI and all other users to ESC after login

MatthewReda99
Tera Contributor

Hi all, 

 

I have been trying to work this out for a client for months but it seems like something is stopping the redirect from happening. I have followed all articles/documentation regarding login redirection and I have successfully done so on my PDI, however, on my client's instance nothing seems to work. I am writing this to see if anyone can help me understand what could be blocking the redirection from happening. 

 

So far I have, created the 2 system properties glide.entry.first.page.script and glide.entry.page.script and I have edited the SPEntryPage Script Include to "if (user.hasRole('itil') && !redirectURL && !isServicePortalURL)" (see image) but no redirection happens. When signing in from the ESC login page, no matter which user signs in, they are redirected to "esc?id=login" and it seems like the SPEntryPage script does not even run at all. 

 

I have attached some images of what is currently happening. Can someone help me figure out what is stopping the redirection?

 

Thank you.

2 REPLIES 2

Martin Friedel
Mega Sage

Hello Matthew, 

 

I am not sure why it is not working. What about trying workaound - set a Redirect Rule in Homepage Destination Rules table [sys_homepage_destination_rule]? Check this article:

Homepage Redirect Rules in Next Experience 

If my answer helped you, please mark it as correct and helpful, thank you 👍
Martin

Hi Martin, 

 

Thank you for the answer but this does not seem to be a solution for the issue I am facing. This does not fix the redirection after logging in from the Employee Center.