The REST endpoint /rest/api/2user?username=<username> is returning Internal Server Error on certain instances. The same REST END point can be used to create users via POST /rest/api/2/user strangely.
- Look for an ID Plat instance and create a dummy user from the user management.
- Edit the user via REST API.
If the instance hasn't been migrated to Attlassian account/Identity Platform then results should be returned similar to one seen here.
If the instance is already on Attlassian account/Identity Platform then due to https://confluence.atlassian.com/jirakb/user-management-rest-api-changes-in-jira-cloud-858756548.html PUT /rest/api/2/user may not work. However REST endpoint shouldn't return 500 Internal Server Error and documentation should notify about the changes.
In case of changing user email the user on his/her own needs to login to Atlassian account and manually change the email.