Support Questions
Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Innovation Accelerator group hub.

How to get groups user is attached to in Ranger users/groups?

Explorer

I know how to get the available fields from, parsing them in Python with Element Tree.

<Element 'vxUser' at 0x1453d50> 
<Element 'createDate' at 0x1453d90>
<Element 'id' at 0x1453e10>
<Element 'owner' at 0x1453e50>
<Element 'updateDate' at 0x1453e90>
<Element 'updatedBy' at 0x1453f10>	
<Element 'description' at 0x1453f50>
<Element 'firstName' at 0x1453f90>	
<Element 'lastName' at 0x1459050> 
<Element 'isVisible' at 0x1453fd0> 
<Element 'name' at 0x1459090> 
<Element 'password' at 0x14590d0> 
<Element 'userRoleList' at 0x1459110>
<Element 'userSource' at 0x1459150>

However, the ONE field in Ranger > Users that does not show is the last field in the WebUI: Group. Where is this from? I am looking for the API to get this. I would understand if I had to link some kind of ID from a field above, but I have no idea. The group in our field is an openLDAP group, if that helps.

1 REPLY 1

This call http://<ip>:6080/service/xusers/users/<id>; provides groupIdList, groupNameList in the json output. Please check it out.