Error when creating users through API 2.26

Hi

I am trying to create users through API but getting following error :-

{

“httpStatus”: “Internal Server Error”,

“httpStatusCode”: 500,

“status”: “ERROR”,

“message”: “attempted to assign id from null one-to-one property [org.hisp.dhis.user.UserCredentials.userInfo]”

}

This is payload :-

{

“firstName”: “John”,

“surname”: “Doe”,

“email”: "johndoe@mail.com",

“userCredentials”: {

“id”: “ZyjSDLHGPv4”,

“username”: “johndoe”,

“password”: “Your-password-123”,

“userRoles”: [ {

“id”: “QzwsdyqEen5”

} ]

},

“organisationUnits”: [ {

“id”: “MLem6FZoSe9”

} ],

“userGroups”: [ ]

}

PFA Postman screenshot and tomcat log.

Version:
2.26
Build revision:
b99535d
Build date:
2017-03-11 06:37

Am using the same json format as given in documentation. Please help.

Regards

harsh

log.txt (15.8 KB)