When attempting to use the update by id endpoint providing anything in the password field results in 400 Bad Request: Unable to find the username in the field username so I figured the username field was required but that just gives 400 Bad Request: Cannot update username and password simultaneously.
Figured it out, it was an issue with the query. I was using page and per_page to limit the results to 1 however for a number of the emails there are duplicate accounts stored in both ldap and auth0’s database service, the API was returning ldap users first and as such the UID was pointing at the wrong entity when trying to perform the patch. Thankfully the connection parameter will get around this.
Perhaps the error could be more helpful, either state uid does not exist in connection x, or that you cannot update ldap user credentials.