List of all objects shared with a user group?

Hi all,
I’m working on a user access audit and am trying to pull a list of all of the items (all data sets, programs, program stages, pivots, dashboards, etc) that are shared with a certain user group. Is there a quick way to do this?

I can’t find anything in the API for this (the userGroup query can return the list of users but not the shared objects, as far as I can tell). We’re on DHIS 2.30.

Thanks for your help!

1 Like

Not sure if this is what you are looking for, and the query is a heavy one, but you could use metadata api endpoint, and filter by userGroupAccesses, something like this:

https://play.dhis2.org/2.33.1/api/metadata.json?filter=userGroupAccesses.userGroupUid:eq:jvrEwEJ2yZn

to see what objects userGroup with uid jvrEwEJ2yZn has access to.

Hope this helps.
Vlad

2 Likes

Thank you Vlad!! That was perfect!

I added &fields=id,name to reduce the size of the output for my report.

https://play.dhis2.org/2.33.1/api/metadata?filter=userGroupAccesses.userGroupUid:eq:jvrEwEJ2yZn&fields=id,name

1 Like