Report to combine user details

Preethi26
Tera Contributor

Hi Team,

I need to create table for user details. Like I want to provide full data of user, they group and respective role information.

I have created database view, but exact data is not appearing.

Please help me to figure it out or provide some ideas to create.

1 ACCEPTED SOLUTION

kriangkrai
Tera Guru

Hi @Preethi26 

 

You may try create DB View from below tables.

 

sys_user + sys_user_grmember + sys_group_has_role

 

This view shows all users with their groups and roles that related to the group.

 

DB Views

 

kriangkrai_0-1698215574449.png

 

Result

kriangkrai_1-1698216954663.png

 

Another solution to create Visualize User's Role Inheritance Map .

 

Hope this help.

 

Regards,

Oat

View solution in original post

3 REPLIES 3

Namrata Ghorpad
Mega Sage
Mega Sage

Hello @Preethi26 ,

Please update the where clause in view table like below then you can see the all groups and roles assigned to user.

 

NamrataGhorpad_0-1697906023135.png

 

Please mark my answer as correct and helpful if it resolves your issue.

Regards,

Namrata

 

Hi @Namrata Ghorpad 

Thank You i did it already but group role mapping is not correct.

Please find query in below link and suggest.

https://www.servicenow.com/community/itsm-forum/database-view/td-p/2706549

kriangkrai
Tera Guru

Hi @Preethi26 

 

You may try create DB View from below tables.

 

sys_user + sys_user_grmember + sys_group_has_role

 

This view shows all users with their groups and roles that related to the group.

 

DB Views

 

kriangkrai_0-1698215574449.png

 

Result

kriangkrai_1-1698216954663.png

 

Another solution to create Visualize User's Role Inheritance Map .

 

Hope this help.

 

Regards,

Oat