How to redirect specific users to the employee center and not the backend
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2023 11:46 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2023 05:54 AM
Hi Daniel,
Check the SPEntryPage script include and modify the redirection according to the role.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2023 07:55 AM
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.
Suresh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2023 04:34 AM
@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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2023 05:44 AM
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.