- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2020 02:20 PM
Up until a month or so ago the majority of our end users had no roles assigned to them. Their only interactions with ServiceNow were forced through the Service Portal. However, when we deployed the Emergency Self Report application we were forced to grant everyone the sn_imt_quarantine.crisis_task_user role in order for them to access the application through the Service Portal.
Now that they have a role they are no longer classified as ESS users, which means they can now access the base platform. This is leading to confusion within our organization so we want to return to the original behavior of non-ITIL users being redirected to the Service Portal.
I've followed the steps outlined in this article - https://pathwayscg.com/service-portal-auto-redirect/ - but the issue persists. I've tried in both our DEV instance and my personal developer instance, same behavior in both.
Am I missing something with this article? How have others blocked platform access (redirecting to SP) for people without certain roles?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2020 02:25 PM
Check below for service portal redirection based on role
https://community.servicenow.com/community?id=community_blog&sys_id=cbcda2e9dbd0dbc01dcaf3231f961949
Regards,
Sachin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2020 02:25 PM
Check below for service portal redirection based on role
https://community.servicenow.com/community?id=community_blog&sys_id=cbcda2e9dbd0dbc01dcaf3231f961949
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2020 07:44 AM
Thank you
Turns out I had a typo, I was using 'user.hasroles("itil"). Instead it should be 'user.hasRole("itil"), singular vs plural. So line 69 in our SPEntryPage script include looks like this:
if (user.hasRole("itil") && !redirectURL && !isServicePortalURL)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2022 05:14 AM
Hi
I am also trying the similar requirement.
itil user should navigate to home page and nd users with no roles should be routed to /sp page
But the changes didnt work for me
if (user.hasRole("itil") && !redirectURL && !isServicePortalURL)
return;
Please help me understanding if I am missing anywhere
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 10:53 PM
Thanks @LikeARabbit for posting the resolution, took me half a day to debug that extra s in baseline code.....