In Bitbucket, how can you tell which groups are in use?

We are using groups in active directory for access control on some repo's.  How can we show which groups are being used by which repo's?

We are changing our active directory configuration, and we'd like to change the access control so that we don't lose it when the old groups disappear.

3 answers

I haven't seen anything like this as a complete solution.

What I would try is using Bitbucket-REST API (

A solution might be: /rest/api/1.0/admin/permissions/groups (haven't used this API yet ...)

Another solution might be:

  1. Get a list of all Bitbucket Projekts   (/rest/api/1.0/projects)
  2. Iterate over all projects and
    - get all Group-permissions for each project (/rest/api/1.0/projects/{projectKey}/permissions/groups)
    - get all Repositories for each project (/rest/api/1.0/projects/{projectKey}/repos)
      - Iterate over all repositories and 
        - get all Group-permissions for each repository (/rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/permissions/groups)
        - get all Branches for each repository (/rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/branches)
           - Iterate over all Branches and
                - get all Group-permissions for each branch (Hmmmm ... is this possible via API -haven't found it immediately...)

This requires a little scripting but should give you all you need

SQL is much easier for me personally.  Would love to have a way to pull this from the back-end mysql database.... if it's there.

As I've written a REST-Client Framework for Bitbucket for internal use, i prefer using the API wink

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

439 views 6 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you