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

Manoj
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 16, 2023

Hi,

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

@Manoj 

 

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 https://docs.atlassian.com/bitbucket-server/rest/7.21.0/bitbucket-rest.html#idp36)

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

 

Let me know if you that works

 

Cheers

Kurt

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events