How to redirect specific users to the employee center and not the backend

Daniel R2
Kilo Sage

Hi,

 

On our current CSM implementation project, there is a requirement to ensure requesters are always directed to the employee center, and if they try to access the backend they should still be redirected to the employee center. 

How can we configure this redirection?

 

Agents should have the possibility to go to the backend as of course they need to access cases from there and the CSM workspace.

4 REPLIES 4

Sangeetha Harin
Tera Contributor

Hi Daniel, 

Check the SPEntryPage script include and modify the redirection according to the role. 

ersureshbe
Giga Sage
Giga Sage

Hi, All redirections are happening based out the user or customer roles. It has been defined in SPEntryPage Script Include. The base code is available but you should customize based on your business requirement.

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0746730

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0787957

https://serviceportal.io/docs/documentation/sso_configuration.md

 

Pls refer above link and get the ideas.

Regards,
Suresh.

Daniel R2
Kilo Sage

@Sangeetha Harin @ersureshbe, thank you for your replies it is much appreciated. 
We have updated the SPEntryPage Script Include accordingly and it is working to an extent. When the requester logs in they are directed to the Employee center which is perfect, and when the agent logs in they are directed to the backend, which is exactly what we want.

However, if the requester were to search https://*******.service-now.com/now/nav/ui/home in the URL they can still navigate to the backend. How can we resolve this. So that if the requester ever found themselves trying to access the backend through https://*******.service-now.com/now/nav/ui/home  they will just be redirected back to the employee center instead.

Have you updated the below code to match it with your requirement?

//if (user.hasRoles() && !redirectURL && !isServicePortalURL)
// return;
if((user.hasRole('itil') || user.hasRole('knowledge'))&& !redirectURL && !isServicePortalURL)
return;

 

Mark this as correct answer if its solves your issue.