Export Users to excell/CSV file

Hello you all!

I was requested by my to team to extract users from a specific DHIS2 instance but on the users, list app doesn’t have an option to export the users list. So I would like if there’s someone who have developed or implemented an app to extract users from DHIS2 Instance?

Thanks in advance for your suppporot

Hello Carlos Alberto Massavanhane Júnior.

Have you tried the import/export application?

Image 1: The Import/Export

Image 2: Interface of the import export Application.

I hope our response is able to solve the issue you were facing.

With :heartpulse: from the Dhistance Team.

DHISTANCE.com: The Easiest DHIS2 Setup system. Up and running in 5 minutes!

No technical knowledge needed! Great Support with Data Security/Confidentiality.

2 Likes

Thanks @e4eDHIS2 for your explanation. but there’s a limitation that I had found on this way which is regarding to know the organizations units and roles that the users are part of. Do you have any tip for that?

@carlos.massavanhane,

It’s also possible to export using the API. For example, I could get the list of all users using the API users endpoint: instance_URL/api/users?fields=* However, as you can see here the userRole will only appear as id so I could download it by adding changing the request to /api/users.xls and then replace the ID with name.

However, if your focus is on the user roles, you could try this:
instance_URL/api/userRoles?fields=displayName,users[*]

This resource might come in handy for your task:Users - DHIS2 Documentation

Good luck! :+1:

2 Likes

Thank you fro assistance @e4eDHIS2 and @Gassim

1 Like

Hi @carlos.massavanhane
You may want to check out the User Extended App developed by WHO and EyeSeaTea. I havent done extensive tests but it seems to provide the functionality you’re looking for.
https://apps.dhis2.org/app/1bf66488-93b5-41c8-abfe-1b03b2521a2d

2 Likes