Uploaded image for project: 'Jira Platform Cloud'
  1. Jira Platform Cloud
  2. JRACLOUD-66936

PUT /rest/api/2/user to update user details returning internal server error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • Ecosystem
    • None

      Summary

      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.

      Steps to Replicate

      1. Look for an ID Plat instance and create a dummy user from the user management.
      2. Edit the user via REST API.

      Current Results

      curl -X PUT -H "Content-Type: application/json" -H "cookie: cloud.session.token=some_token"  -d '{"emailAddress": "vincent_chin@test.com","displayName": "vincent_test"}'  https://<ID-PLAT-INSTANCE>.atlassian.net/rest/api/2/user?username=Atlassian+Test
      
      {"errorMessages":["Internal server error"],"errors":{}}
      

      Expected Results

      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.

      Workaround

      In case of changing user email the user on his/her own needs to login to Atlassian account and manually change the email.

              Unassigned Unassigned
              vchin Vincent Chin (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              12 Start watching this issue

                Created:
                Updated:
                Resolved: