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

Cannot delete user using the Jira API if issues are assigned, have comments or are reported by the users

    • 472
    • 64
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

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

      Summary

      Cannot delete a user using the Jira API if issues are assigned, reported, or have comments added by the users

      How to Replicate

      1. Assign issues to the user, have tickets created/reported by the user, or have tickets where the user added comments.
      2. Try to delete the user using the Jira delete API(v2/v3)

      Expected Result

      The user should be deleted successfully

      Actual Result

      {"errorMessages":["Cannot delete user 'XXXXXXXX' because 170 issues were reported by this person.","Cannot delete user 'XXXXXXXX' because 3 issues are currently assigned to this person.","Cannot delete user 'XXXXXXXX' because they have made 23 comments."],"errors":{}}%   
      

      Cannot delete user 'xxxxx' because x issues are currently assigned to this person.
      Cannot delete user 'xxxxx' because they have made x comments.

            [JRACLOUD-82526] Cannot delete user using the Jira API if issues are assigned, have comments or are reported by the users

            Pinned comments

            Hello everyone,

            For removing or deleting users within your organisation, my recommendation is to not use the Jira delete user API. Instead, please use the admin APIs, which are specifically designed for this. These APIs ensure that users can be removed or deleted even if they have issues or comments assigned to them.

            1. The admin user delete api (for managed accounts)
            2. The admin user remove api (for unmanaged accounts)

            Sjoerd De Feijter added a comment - Hello everyone, For removing or deleting users within your organisation, my recommendation is to not use the Jira delete user API . Instead, please use the admin APIs, which are specifically designed for this. These APIs ensure that users can be removed or deleted even if they have issues or comments assigned to them. The  admin user delete api  (for managed accounts) The  admin user remove api  (for unmanaged accounts)

            All comments

            candido.pereira added a comment - - edited

            Hi everyone,

            23224c52fdab you can only use the admin user API if you are on the new user management experience.
            Regards,

            Cândido

            candido.pereira added a comment - - edited Hi everyone, 23224c52fdab you can only use the admin user API if you are on the new user management experience. Regards, Cândido

            Manoj added a comment -

            hi

            Manoj added a comment - hi

            Hello everyone,

            For removing or deleting users within your organisation, my recommendation is to not use the Jira delete user API. Instead, please use the admin APIs, which are specifically designed for this. These APIs ensure that users can be removed or deleted even if they have issues or comments assigned to them.

            1. The admin user delete api (for managed accounts)
            2. The admin user remove api (for unmanaged accounts)

            Sjoerd De Feijter added a comment - Hello everyone, For removing or deleting users within your organisation, my recommendation is to not use the Jira delete user API . Instead, please use the admin APIs, which are specifically designed for this. These APIs ensure that users can be removed or deleted even if they have issues or comments assigned to them. The  admin user delete api  (for managed accounts) The  admin user remove api  (for unmanaged accounts)

            Come on...

            Arnar Símonarson added a comment - Come on...

            I think it is time for you to do this, since 2014 it has been 11 years, in these 11 years we have seen the price increase considerably and something so simple and necessary to comply with some regulations you have not implemented.
            Right now this is blocking us in some companies. 
            Please do something about this.

            Alberto Garcia Blazquez added a comment - I think it is time for you to do this, since 2014 it has been 11 years, in these 11 years we have seen the price increase considerably and something so simple and necessary to comply with some regulations you have not implemented. Right now this is blocking us in some companies.  Please do something about this.

            Deleting a user via Directory, Users, select User, Remove User is working. Even if the same user cannot be deleted via API.

            Why does this function behave contradictive?

            Alex Ziegltrum added a comment - Deleting a user via Directory, Users, select User, Remove User is working. Even if the same user cannot be deleted via API. Why does this function behave contradictive?

            What a bad surprise! Thank you for helping us anytime

            Iorio Cristian added a comment - What a bad surprise! Thank you for helping us anytime

            It is a pity that Atlassian hasn't bothered to give at least one obvious workaround. There is a function to Anonymize users. This is actually what you should be using for users that have been active in the system. Alternatively you would have to make changes in the database which I strongly advise against.

            Nico van Leeuwen added a comment - It is a pity that Atlassian hasn't bothered to give at least one obvious workaround. There is a function to Anonymize users. This is actually what you should be using for users that have been active in the system. Alternatively you would have to make changes in the database which I strongly advise against.

            Rananjay Pathania added a comment - https://getsupport.atlassian.com/browse/MOVE-1751053#  

            From admin console also we are not able to delete the user.

            Cannot delete user. 'rk:84ayzce01' has associations in Jira that cannot be removed automatically.

            Vinoth Faraday PS added a comment - From admin console also we are not able to delete the user. Cannot delete user. 'rk:84ayzce01' has associations in Jira that cannot be removed automatically.

              Unassigned Unassigned
              mfaiz@atlassian.com Mohamed Faiz (Inactive)
              Votes:
              96 Vote for this issue
              Watchers:
              105 Start watching this issue

                Created:
                Updated: