Redirect user to a specific portal if user has certain role

Utpal Dutta
Tera Guru

Hi community members,

 

I want to redirect all the users who have (xyz) role and logging into our Dev instance to a specific portal (onboarding). I am able to do this when user 1st time logs in without any specific portal URL defined, after login when I remove (/onboarding) from the URL and hit enter the user is able to see the backend. (This is the issue!!!)

 

I do not want users to see the backend even if they modify the URL and tries to see the backend of ServiceNow. User with (xyz) role should always see the (onboarding) portal only.

 

Please help me achieve this functionality!

1 ACCEPTED SOLUTION

Utpal Dutta
Tera Guru

Well this UI script worked for my requirement. I figured it out on my own.

 

Screenshot 2022-11-13 at 9.25.37 PM.png

View solution in original post

5 REPLIES 5

Arjit Gourav
Tera Contributor

Hi @Utpal Dutta ,

Have followed the same approach to achieve a similar requirement. I have also the use case for users to redirect to a single portal regardless of any URL they try.

But unfortunately, I am not able to achieve the same. And also trying on the PDI as well to redirect users to SP if they have any random role.

Does anything specific need to be follow for the catch block too?