The Now Platform® Washington DC release is live. Watch now!
UI Scripts, Login Rules, or Installation Exits? It seems as if some ServiceNow users are trying to use the same method for all angles of redirection. Using the same method for all aspects of redirection isn't the best way to go about logging in your users. So if one method for all redirection isn't the answer, which method is the best for which aspect?
UI Scripts can be used like script includes, but they can also be used as global UI Scripts (careful, a bad global UI Script can prevent users from logging in or doing anything…). A global UI Script will execute any time a user enters a page (such as login.do, navpage.do, home.do).
A few caveats though
An example of such a UI script given by Travis Toulson can be found here: Redirect ITIL users to CMS.
Login rules are the old way on how to tell which CMS (Content Management System) sites to direct a user to. Login rules fire after the user entered his login information, but before going to the home screen. Their conditions allow for advanced conditions with access to the gs (GlideSystem) object. They are part of the Content Management application and are used to redirect users to "their" ESS page or to the non-ESS interface.
Keep in mind that login rules do not work properly on domain separated instances currently.
Installation exits in this context are interfacing to the login and logout functionality, and I have most often worked with them when configuring the SAML integration.
I have for example edited the SAML2SingleSignon_update1 Installation exit to check for users who have or do not have roles and changed the redirect:
Remember how we mentioned earlier that global ui scripts are called when entering, but not when leaving a page? Upon entering the login.do page, we do not know which user is in the process of logging in; and upon exiting, we are already on our way to the default login home site as defined in the system. I have found that admins have the most success when they use both a method that runs on login (installation exit or login rule) and a global UI script. This way, all possible escape routes are covered and users are directed to the site they are supposed to be.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.