How to get users having only ITIL role but not admin role
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2020 07:18 AM
How do I get users who have only ITIL role but not any other role like admin role?
- Labels:
-
Request Management
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2020 07:28 AM
Hi,
Use this in your script
gs.hasRoleExactly('itil');//Returns true only if the current user has the specified role.
Thanks,
Kunal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2020 07:40 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2020 07:34 AM
Hi Ajay,
I have figure out the way
we can use filter: sys_id - is - "javascript:getRoledUsers('IN','itil')"
as I shown below:
Hope this will help you!!
If my response helps you then kindly mark my answer helpful 👍and correct ✔otherwise if any query 🤔 feel free to ask further.
Thanks,
Ajim

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2020 07:44 AM
Hi,
If you could explain a bit more, that'd be great...
Not sure what you mean by "how do I get" and then what are you doing with them?
Otherwise, like what's happening here, we provide responses and then you have to ask follow-on questions.
Let us know what you'd like to do like:
I would like to find all users within my instance that have ITIL role, because I want to add them all to 'x' group...
Then we can help more specifically and efficiently.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!