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

    • 407
    • 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.

          Form Name

            [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.

            Workaround is to delete the user in the admin console

            Ollie Peacey added a comment - Workaround is to delete the user in the admin console

            Hello Atlassian,

            Could you kindly inform us of the expected implementation date for this feature?

            Additionally, please advise if there are any available workarounds.

             

            Deleted Account (Inactive) added a comment - Hello Atlassian, Could you kindly inform us of the expected implementation date for this feature? Additionally, please advise if there are any available workarounds.  

            Lily added a comment -

            6 years already..
             

            Lily added a comment - 6 years already..  

            Is there any solution for this problem?
            Deleting users via GUI is ridiculous

            Jakub Morawczynski added a comment - Is there any solution for this problem? Deleting users via GUI is ridiculous

            As far as I understand, the API only allows to delete and not disable (weird by itself), but the best part is that we can't delete them if there is any activity on it?
            But the portal interface allows to do this? C'mon Atlassian, our life is already hard why you make it harder?

            Sérgio Sousa added a comment - As far as I understand, the API only allows to delete and not disable (weird by itself), but the best part is that we can't delete them if there is any activity on it? But the portal interface allows to do this? C'mon Atlassian, our life is already hard why you make it harder?

            Steven Moore added a comment - - edited

            After working to migrate my company's server instance to cloud for almost a year, I must say Atlassian is the worst product to work with, the migration tools are a joke, the platform is an amalgam of half baked ideas and I will do my best to avoid supporting this garbage platform in the future. I'll do all I can to convince my company to abandon all investment of anything they produce going forward.

            This case is yet another dead-end to an issue I'm attempting to resolve in vain in a long line of dead-ends. What an eye opening experience. 

            Steven Moore added a comment - - edited After working to migrate my company's server instance to cloud for almost a year, I must say Atlassian is the worst product to work with, the migration tools are a joke, the platform is an amalgam of half baked ideas and I will do my best to avoid supporting this garbage platform in the future. I'll do all I can to convince my company to abandon all investment of anything they produce going forward. This case is yet another dead-end to an issue I'm attempting to resolve in vain in a long line of dead-ends. What an eye opening experience. 

            Hi,

            This basically means at the moment the delete call only works on users who never interacted with the tool.
            This issue is a big problem for us as we need to be able to remove users in an automated way even if they have done some actual work.

            Could we please have an ETA for a fix?

            Thank you

            Canonical IS added a comment - Hi, This basically means at the moment the delete call only works on users who never interacted with the tool. This issue is a big problem for us as we need to be able to remove users in an automated way even if they have done some actual work. Could we please have an ETA for a fix? Thank you

            Hello,
            do you have an estimated date for this issue to be resolved?

            Joao Vitor Alves Soares added a comment - Hello, do you have an estimated date for this issue to be resolved?

            Hello,

            Can you please fix this issue? 

            William Giraud added a comment - Hello, Can you please fix this issue? 

            Egor added a comment -

            Hi Atlassian, can you please support this update?

            Egor added a comment - Hi Atlassian, can you please support this update?

            Did someone managed to get answer on this ?? 
            Why there's no solution yet.

            Prajapati Mahaveer added a comment - Did someone managed to get answer on this ??  Why there's no solution yet.

            It's extremely painful not being able to delete a user that has Jiraissues.

            What is the purpose or the current implementation if it only allows to delete users that have never done anything with Jira(why would they get an account in the first place if they're not expected to use it?)

            Matthieu Barthelemy added a comment - It's extremely painful not being able to delete a user that has Jiraissues. What is the purpose or the current implementation if it only allows to delete users that have never done anything with Jira(why would they get an account in the first place if they're not expected to use it?)

            sivagamia added a comment - - edited

            Hi Team - Do we have an ETA on fixing the API?

            sivagamia added a comment - - edited Hi Team - Do we have an ETA on fixing the API?

            Hello - when is this going to be fixed by allowing us to delete via the API?

            Robert Rodrigues added a comment - Hello - when is this going to be fixed by allowing us to delete via the API?

            It is tedious to go to the user management and click delete for each user , we really need API to work overriding the exception message coming - Obviously it would be Admin only who would have access to delete users . 

            Saurabh Sharma added a comment - It is tedious to go to the user management and click delete for each user , we really need API to work overriding the exception message coming - Obviously it would be Admin only who would have access to delete users . 

            At least you can move disable user API from admin API to the same set of API here?

            Nguyen Nguyen added a comment - At least you can move disable user API from admin API to the same set of API here?

            Careerist added a comment - - edited

            We also met this situation, it's really inconvenient. We wanted to automate the deletion of users. Why then do this opportunity in API, if we can't use it? 

             
             
             
             
             

            Careerist added a comment - - edited We also met this situation, it's really inconvenient. We wanted to automate the deletion of users. Why then do this opportunity in API, if we can't use it?           

            Not being able to delete users due to users having comments on a ticket,   would mean that just about every user that uses the application in a realistic way,  can not be deleted,  since at some point in their use of the app they made a comment on some ticket.

            Also being able to delete users who are assigned tickets,  should be a thing.  If a user leaves the company that hosts that Jira software,  that user should not be in the system.  You can go to the admin console and delete the users manually,  but why should we have to do that,  if we have an API that is supposed to do it for us?

            gage.harris@dillards.com added a comment - Not being able to delete users due to users having comments on a ticket,   would mean that just about every user that uses the application in a realistic way,  can not be deleted,  since at some point in their use of the app they made a comment on some ticket. Also being able to delete users who are assigned tickets,  should be a thing.  If a user leaves the company that hosts that Jira software,  that user should not be in the system.  You can go to the admin console and delete the users manually,  but why should we have to do that,  if we have an API that is supposed to do it for us?

            We would like to see this capability added.   When calling the "user delete" REST API, we are encountering the same error message, if the user has 1 or more issues or comments.  We don't understand why we don't see that error message when deleting the user from the User Management web user interface.  We need to be able to proactively delete or deactivate users that are no longer using the Jira cloud service in order to get the most value out of the service relative to our costs.  Not being able to deactivate or delete users programmatically is not acceptable.  

            Jeremy Treague added a comment - We would like to see this capability added.   When calling the "user delete" REST API, we are encountering the same error message, if the user has 1 or more issues or comments.  We don't understand why we don't see that error message when deleting the user from the User Management web user interface.  We need to be able to proactively delete or deactivate users that are no longer using the Jira cloud service in order to get the most value out of the service relative to our costs.  Not being able to deactivate or delete users programmatically is not acceptable.  

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

                Created:
                Updated: