how to disable a user in bitbucket using database or rest api

Manoj February 16, 2023


We are trying to disable the users who are inactive on bitbucket for a certain period of time. Using Rest API we are able to fetch the users who are inactive. Users are from an external directory and they are licensed users because of the groups. Can anyone please suggest how to disable the user either by using an API or database?

1 answer

0 votes
Kurt Klinner
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 18, 2023



Hi Manoj

welcome to the Atlassian community.


One option is to remove the user from all groups he is member of

POST to this endpoint for removing users from groups (see also

  • /rest/api/1.0/admin/users/remove-group
  • Example POST request body:
    "context": "username",
    "itemName": "groupname"


Let me know if you that works




Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events