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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

188 views 20 8
Join discussion

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