Creation/Importing of bulk users in DHIS2

How do i create or import bulk users into DHIS2 instance. I want to create 40,000 users by importing the usernames, passwords, roles, organization units and other fields through a csv file.

Hey @Ganiyat25! Welcome to the community! :stars::stars:

Have you tried using the import/export app? Maybe test it for a couple hundred first then a thousand …etc Please see the docs: Import/Export App - DHIS2 Documentation

Hello @Gassim . Does the import/export app work for creating bulk usernames and passwords (along with roles and organization units) for the Organization units that exist in DHIS2 instance?

:sweat_smile: I haven’t tried to! Sorry, I thought it was like importing the metadata not accounts and didn’t notice you mentioned “passwords” the first time. So I asked now for support to see if someone will answer. I don’t think we can even export the passwords. I think this is a database related task which means you’d have to have access to the database. Thanks!

Hi @Ganiyat25

It is not possible as far as I know to do this with CSV, although it should be possible with a JSON metadata payload. This is described here

However, I would not recommend the approach, since you would need to create and share the password with each user up front, which is not necessarily best security practice.

The better approach would be to create an invitation for each user, and allow them to specify their own password. This approach is described here.

Good luck!
Jason

1 Like