Auth0 Home Blog Docs

Additional properties not allowed - can't create user using management API




I am having difficultis in creating user using management API. This is how my curl looks like

curl -i -X POST -H 'authorization: Bearer normaly.I_have_token_here' -H "Accept: application/json" -d '{"connection":"Username-Password-Authentication"}'

and then response I am getting

{"statusCode":400,"error":"Bad Request","message":"Payload validation error: 'Additional properties not allowed: {\"connection\":\"Username-Password-Authentication\"} (consider storing them in app_metadata or user_metadata. See \"Users Metadata\" in for more details)'.","errorCode":"invalid_body"}


Can you please post the entire request to investigate - I don’t see any email or password parameters in that CURL request.


You’re sending the wrong headers, the -d options will default to sending a content type of application/x-www-form-urlencoded and you want to send JSON.

You should be also sending an additional header: -H "Content-Type: application/json"

In addition and like mentioned in the comments, you’ll need to include more than just the connection information.