Redirection to two different portals based on role or company

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2019 06:47 PM
I have two seperate portals configured in Servicenow.
One internal using Single Sign on with AD users. With these users they are split into ITIL or non ITIL users
Internal
Non itil role users are redirected directly to /sp portal when entering our instance URL
Itil role users are redirected to the backend of ServiceNow
External
This external Portal is called (for example) /newportal
It requires Authentication via the ServiceNow login and my users are manually entered into Servicenow without the itil role and with a seperate newportal role. These Users have a specific newportal role and a newportal company assigned to them. I have locked down all pages etc. between these two portals so one cannot access the other in any way.
THE ISSUE
When my External users log in with their creds to https://myinstance.service-now.com/newportal it logs them in fine, however if they then drop the /newportal suffix, it redirects them to my internal Servicenow instance backend!!!
This is despite the fact that they are non Itil users!! It is like it is cacheing the credentials somehow externally and ignoring the fact they are non itil users.
I want to setup my spentry page to recognise each of the two roles and redirect to either /sp or /newportal dependant on the role. but is this page used if I am doing SingleSignOn internally?
I can see this in the SpEntryPage Script Include has this entry.....
if (user.hasRoles() && !redirectURL && !isServicePortalURL)
return;
I am very flaky on what to put here, but can anyone help me with the code to redirect to two different portals based on someones role. Or is there a much better way to do this?
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2019 10:03 PM
Not sure if you've seen this post in your searches. I used it not too long ago to set redirects to different portals for users based on an attribute on their company record.
You may need to tweak a little bit of what's shown in the accompanying video, but the basic principles are there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2019 02:40 AM
Hi @mattmm,
We are having a similar requirement. We need to provide roles to external users and they need to land to the new portal only upon login. We are finding issues with redirecting these users to the new portal as they are having some role and the SPentryPage script include directs users with role to the ServiceNow instance view. Could you please let me know how you had configured this and the fix for this issue?
Thanks in advance,
Anu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2020 02:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2021 02:26 PM
Hello matt,
We are stuck with similar type of requirement. Did you found any solution on this?
Best Regards,
Meenal Gharat