- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2018 04:32 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2018 04:38 AM
HI,
If you want to check it in business rule then use this:
gs.hasRole('itil'); //This is for logged in user
in client script you can use, for logged in user:
g_user.hasRole();
Link : https://www.servicenowguru.com/scripting/user-object-cheat-sheet/
If you have to check for someother user other than logged in user:
then you will have to query the table : sys_user_has_role and check if he has that role or not.
Thanks,
Ashutosh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2018 04:36 AM
Hi Sreenivas,
Look for sys_user_has_role table.
Also, you may refer link. Just replace abc in the URL with your instance name.
Thanks,
Jaspal Singh
Hit Helpful or Correct on the impact of response.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2018 04:38 AM
HI,
If you want to check it in business rule then use this:
gs.hasRole('itil'); //This is for logged in user
in client script you can use, for logged in user:
g_user.hasRole();
Link : https://www.servicenowguru.com/scripting/user-object-cheat-sheet/
If you have to check for someother user other than logged in user:
then you will have to query the table : sys_user_has_role and check if he has that role or not.
Thanks,
Ashutosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2018 04:39 AM
Hi Sreeni,
navigate to users, in filter type below query
Thank you

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2018 04:46 AM
https://community.servicenow.com/community?id=community_question&sys_id=38038ba1dbd8dbc01dcaf3231f96192b