logo

NJP

Service Portal Redirect App - by Group, by Role, by User field

Import · Jun 21, 2018 · article

Hi Team,

I've posted this in a few threads talking about Service Portal redirects - I just wanted to share a custom app that I've built to solve a requirement that I had in my instance around Service Portal Redirection for multiple user groups/roles/whatever.

The reason I developed this is because I had a requirement to introduce a number of different default portals with not only different branding depending on which Company the user worked for, but also to allow different user types to see different content based on Role or Group.

It will not only allow me to build Service Portal versions for different groups, but also allows me to do "dark launches" of new Service Portals for different user groups.

Here's the Service Portal Redirector App on Github: https://github.com/milligna/sn-portal-redirector.git

And here the quick and dirty Wiki for how to use it: https://github.com/milligna/sn-portal-redirector/wiki/Welcome-to-my-ServiceNow-Portal-Redirector

It basically replaces the SPEntryPage script and lets you create a series of redirect rules for different user attributes: Groups, Roles, Field values, and tells the Redirect Script whether or not to send the user to the Platform UI or to direct them to a specific Service Portal:

image

It's in testing in my environment now, but it seems to do the trick. I thought I'd do it as a scoped app and see if it works for others.

The only limitation is that Scoped Apps can't access some of the functions required by the SPEntryPage Script include, so you have to create your own version of SPEntryPage in the Global Scope to use it. The sample Script Include in the Scoped app won't work while it's scoped, but if the content is copied out, then it will.

If anyone wants to try it out and provide feedback, that'd be awesome image Obviously be careful using it in your own company instances - I can't be held responsible for anything going wrong.

Cheers,

Kevin

View original source

https://www.servicenow.com/community/now-platform-articles/service-portal-redirect-app-by-group-by-role-by-user-field/ta-p/2310559