Sometimes, we face problem to create DHIS2 users using web api. In this post we will show you how to create users in DHIS2 using web api. See the below json payload:
{ "id": "IE1zznX91pR", "firstName": "Julhas", "surname": "Sujan", "email": "julhaspustcse@gmail.com", "userCredentials": { "userInfo": { "id": "IE1zznX91pR" }, "username": "julhas999", "password": "your-password", "userRoles": [ { "id": "mo3t1mDUOmy" } ] }, "organisationUnits": [ { "id": "PFgkSbQ0nC0" } ], "userGroups": [ { "id": "L7advm7THNS" } ] }