Alternate workaround for user.hasRoleList when using Server ScriptIssue user.hasRoleList is a Client Script API and won't support when using in Server Script/Script Include. This is as per the documentation as well:https://developer.servicenow.com/dev.do#!/learn/courses/paris/app_store_learnv2_securingapps_paris_securing_applications/app_store_learnv2_securingapps_paris_securing_applications_against_unauthorized_users/app_store_learnv2_securingapps_paris_scripting_securityResolutionThe below workaround can be used to validate if the user belongs to a Role from a defined List. var platformUser = false;var roleList = ['itil','admin'];for(var i =0 ;i<roleList.length;i++){ if(user.hasRole(roleList[i].trim())) { platformUser = true; break; }}