How to get list of users who has no roles except 'snc_internal' role only ?

Admin7267
Kilo Sage

Hello,

 

How to get list of users who has no roles except 'snc_internal' role only ?

 

Thanks,

Tarun

 

'

1 ACCEPTED SOLUTION

Aman Kumar S
Kilo Patron

Hey,

You can refer to below article and response by Akash Gurram, just replace sys_id of itil role with snc_internal:

How to get list of user who have only ITIL role?

 

Feel free to mark correct, If I answered your query.

Will be helpful for future visitors looking for similar questions 🙂

 

Best Regards
Aman Kumar

View solution in original post

9 REPLIES 9

Allen Andreas
Administrator
Administrator

Hi,

You could use GlideAggregate to query the sys_user_has_role table and then with the results, check to see if that one role is all they have and the count is 1, if so, push them to an array, just an example for scripting.

You didn't give much information where you're trying to do this, like a report or somewhere else?

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Mohith Devatte
Tera Sage
Tera Sage

Hello,

You can navigate like below

sys_user_has_role.LIST in left navigator and a table opens up whre you can find all users with roles and there you can filter snc_internal guys

find_real_file.png

Please mark my response correct if it helped you

 

Please mark my answer correct if it helps you

This will fetch even users with other roles as well

Hello Tharun,

But you can filter in role field just like below 

find_real_file.png

Please mark my answer correct if it helps