The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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

TAGS
AUG Leaders

Atlassian Community Events