How to redirect users in ServiceNow

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2021 04:46 PM
Hello,
I have a requirement to redirect users to different pages when the login. Currently this is not done through SSO, but Okta maybe used in the future. We are working with the Customer Service Management Plugin
I have a couple of cases
1) Contacts and Consumers logging in should be redirected to the "csm" portal
2) Agents should be redirected to Agent Workspace, but may need to navigate to UI16
3) Duty Managers and Admins should be redirected to UI16
My current solution involved adding the following lines of code to the getFirstPageURL function of the SPEntryPage script includes.
if(gs.hasRole('admin')|| gs.hasRole('u_back_end_viewer')){
return;
}
if(gs.hasRole('itil')){
return '/now/workspace/agent/home';
}
if(gs.hasRole('snc_external') && redirectURL){
return "/csm";
}
The role u_back_end_viewer has been created to give to duty managers and admins so that they're properly redirected.
This solution works, mostly, however under case (2) Agents can't navigate to UI16, even when using "/nav_to.do?uri=%2Fhome.do%3F" as it instead brings them back to the Agent Workspace. They can however navigate to the customer service portal using /csm.
I am looking for a modification that will handle redirection ONLY when the user logs in, so that Agents can still access UI16 through a different URL or provided link
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2021 03:31 AM
Hi , I am facing the same issue .There is an requirement when the particular role user login it should redirect to agent workspace landing page .Is there any answer for this.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2021 10:49 AM
Not yet, we parked this to look at again in the future
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2022 04:58 AM
Hello @Felix Fleming1
Did you find any solution to your second query (Agents should be redirected to Agent Workspace, but may need to navigate to UI16). I am also facing the same problem. IF you find a solution, please can you share it with us!!
Thank you,
Shivprasad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2022 10:21 PM
In the filter navigator, type: sys_properties.list and press Enter.
Find the property: glide.entry.page.script and set the value to: new SPEntryPage().getLoginURL(), save your changes.
Go back to the sys_properties list, if the property glide.
For the property name, enter: glide.entry.first.page.script.
Regards,
Rachel Gomez
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022 12:32 AM
Hello @Rachel Gomez
When the ITIL user is logged in first, then user homepage should be look like this
This image is service operations workspace, but instead off that i need agent workspace
do you have any idea how to setup like this?