- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2023 01:51 AM
Hello,
I used the docs regarding to "redirecting user to Service Portal"
I followed the instructions, but when I impersonate a user on my instance, it doesn´t redirect me to the ServicePortal site instead I´m landing on the SOW page. I can´t figure out why this happens.
I set the value in the sys_property glide.entry.first.page to new SPEntryPage().getFirstPageURL()
In the Script Include SPEntryPage I changed this.logVariables to "true"
If the impersonate user has no roles, he should be redirected to the SP, shouldn´t he?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2023 02:35 AM - edited 04-03-2023 02:41 AM
Hi @Steve2000 ,
If you want itil users to be redirected to portal then modified condition in script include "SPEntryPage" as below.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2023 02:21 AM - edited 04-03-2023 02:23 AM
Hi @Steve2000 ,
Make sure you added below properties,
1)glide.entry.first.page.script
Type - string
Value - new SPEntryPage().getFirstPageURL()
2)glide.entry.page.script
Type - string
Value - new SPEntryPage().getLoginURL()
I think this will work .
Thanks!
Please mark my answer as helpful if you find this is helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2023 02:29 AM - edited 04-03-2023 02:29 AM
When I do this, the 'itil' user for example, will still be redirected to the SOW site.
So I have to delete the first.page.script and only use the entry.page.script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2023 02:35 AM - edited 04-03-2023 02:41 AM
Hi @Steve2000 ,
If you want itil users to be redirected to portal then modified condition in script include "SPEntryPage" as below.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2023 03:31 AM
Hi , i tried the below code suggested by you.
if (user.hasRoles() && !user.hasRole("itil") && !redirectURL && !isServicePortalURL)
return ;
it works for itil users to get the service portal page but for admin users also it is redirecting to sp page
how to achieve the below requirement . please guide me
if user has no role then redirect to Service Portal page
If user has only role 1 'xxx' then redirect to Service Portal page
If user has only role 2 'yyy' then redirect to Service Portal Page
If the user has any other role along with the above role then it shouldn't redirect to service portal page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2023 02:46 AM
Thank you very much, both of you 🙂
Now it works 👍