• 69
    • 19
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      NOTE: This suggestion is for JIRA Server. Using JIRA Cloud? See the corresponding suggestion.

      Summary

      Currently it appears the /rest/api/2/user (PUT) API doesn't provide facility to set users active or inactive, or perhaps the request representation doesn't include how this is done. Currently the API works fine for the following fields:

      {
          "name": "eddie",
          "emailAddress": "eddie@atlassian.com",
          "displayName": "Eddie of Atlassian"
      }
      

      Can something like "Active": 1 or "Active": true be made available for this API as well to set the Activate or de-activate a user?

      Workaround

      Use Crowd REST API following these steps:

      1. Go to User Management -> JIRA User Server
      2. Create a new one with the below details (you can use your own values):
        • Application Name: app_name
        • Password: app_pwd
        • IP Addresses: Insert the IP/s (each on a separate line) of the client from where the subsequent REST call is to be run (to whitelist it so that the REST call is allowed to run)
      3. Test with this command:
        • If Linux:
          curl -D- -u app_name:app_pwd -X PUT --data '{"name":"anyUsername", "active":"false"}' <jira-url>/rest/usermanagement/1/user?username=anyUsername -H 'Content-Type: application/json' -H 'Accept: application/json'
          
        • If Windows:
          curl -D- -u app_name:app_pwd -X PUT --data "{\"name\":\"anyUsername\", \"active\":\"false\"}" <jira-url>/rest/usermanagement/1/user?username=anyUsername -H "Content-Type: application/json" -H "Accept: application/json"
          

          Use the right username (anyUsername - 2 occurences) and replace <jira-url> with actual JIRA URL

            [JRASERVER-37294] Allow set active/inactive user via REST API

            Cathy S made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 884239 ]
            Katherine Yabut made changes -
            Workflow Original: JAC Suggestion Workflow [ 3063090 ] New: JAC Suggestion Workflow 3 [ 3693399 ]
            Status Original: RESOLVED [ 5 ] New: Closed [ 6 ]
            Daniel Rauf made changes -
            Assignee New: Tomasz Kanafa [ tkanafa ]
            Daniel Rauf made changes -
            Fix Version/s New: 8.3.0 [ 86891 ]
            Resolution New: Fixed [ 1 ]
            Status Original: Gathering Interest [ 11772 ] New: Resolved [ 5 ]
            SET Analytics Bot made changes -
            UIS Original: 92 New: 69
            SET Analytics Bot made changes -
            UIS Original: 104 New: 92
            SET Analytics Bot made changes -
            UIS Original: 115 New: 104
            SET Analytics Bot made changes -
            UIS Original: 116 New: 115
            SET Analytics Bot made changes -
            UIS Original: 127 New: 116
            SET Analytics Bot made changes -
            UIS Original: 138 New: 127

              tkanafa Tomasz Kanafa
              takindele Taiwo Akindele (Inactive)
              Votes:
              156 Vote for this issue
              Watchers:
              101 Start watching this issue

                Created:
                Updated:
                Resolved: