We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Best practice to redirect only the Admin role from OOB Service Catalog module to the Service Portal

LalishaRedC
Tera Contributor

 

I have a requirement to modify the OOB Service Catalog module under Self-Service.

Requirement:

  • Users with the admin role should be redirected to the Service Portal catalog homepage.

  • Users with the itil role (and other non-admin users) should be directed to the native Service Catalog view.

What I tried:

  • Restricted the OOB Service Catalog module to the admin role.

  • Created a duplicate module for the itil role and enabled Override application menu roles.

  • Tested both URL and Script link types in the module arguments.

Result:

  • ITIL users see only the ITIL module, which works as expected.

  • Admin users see both modules because the admin role overrides module visibility restrictions.

Since this approach doesn't seem ideal, is there a recommended or best-practice way to achieve this requirement?

Thanks in advance.

1 ACCEPTED SOLUTION

To achieve this, we can use UI Page in ServiceNow to hold the redirect logic.

 

Here's how it works:

  • The UI page first checks the user's role.
  • For ITIL users, instead of redirecting the current page, the UI page uses window.open() to launch the ESC portal in a new browser tab.
  • For admin users, it keeps redirecting normally in the same tab.
  • This UI page can then be set as the landing page, or called from wherever the redirect is currently happening in your instance.

 

Thank You

View solution in original post

3 REPLIES 3

JenniferRah
Mega Sage

I guess my first question is why you would want to restrict an admin user. By definition, it should be able to get to pretty much anything.

All users other than admins, when navigating from the application navigator the service catalog module should be redirected to native catalog default home view. But only for admin user, it should redirect to service portal catalog home page. This is our given requirement.

To achieve this, we can use UI Page in ServiceNow to hold the redirect logic.

 

Here's how it works:

  • The UI page first checks the user's role.
  • For ITIL users, instead of redirecting the current page, the UI page uses window.open() to launch the ESC portal in a new browser tab.
  • For admin users, it keeps redirecting normally in the same tab.
  • This UI page can then be set as the landing page, or called from wherever the redirect is currently happening in your instance.

 

Thank You