• Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Request to add email address details to the workspace permission API endpoint as it would be helpful in automations.

      GET /2.0/workspaces/{workspace}/permissions
      GET /2.0/workspaces/{workspace}/members
      

      Workaround:

      • Navigate to "Workspace Settings" > "User Directory"
      • Click on the "EXPORT" option available at the top right corner of the page
      • This will allow admins to download a CSV file that contains a list of workspace users along with their email address

      Adding to above request:
      To include user email address along with their UUID's for other API endpoints

            [BCLOUD-22643] Add email address along with nicknames to API endpoint

            I have a workaround for people using Bitbucket and Atlassian:

             

            You can make call to Atlassian API with email to get Atlassian user ID:

             

            https://<your_workspace_name>.atlassian.net/rest/api/3/user/search?query=<email address>

             

            you will get json that has Atlassian user ID , that you can use for Bitbucket API to get bitbucket user UUID

            https://api.bitbucket.org/2.0/users/<Atlassian user ID >

            it's not documented , but in this request  you can put not only Bitbucket uuid but Atlassian user ID too.

            you will get json with Bitbucket UUID as answer

            terraform :

            data "http" "atlassian_request" {
              url = "https://${var.workspace_name}.atlassian.net/rest/api/3/user/search?query=${var.user_email}"
            
              request_headers = {
                authorization = "Basic ${base64encode("${var.atlassian_cred_mail}:${var.atlassian_cred_token}")}"
              }
            }
            
            # get bitbucket user uuid
            data "bitbucket_user" "default" {
              uuid = jsondecode(data.http.atlassian_request.response_body)[0].accountId
            } 
            
            output "uuid" {
              value       = data.bitbucket_user.default.uuid
              description = "bitbucket user UUID"
            }
            
            terraform {
              required_version = ">= 0.15"
              required_providers {
                bitbucket = {
                  source  = "DrFaust92/bitbucket"
                  version = "2.40.1"
                }
                http = {
                  source  = "hashicorp/http"
                  version = "3.4.2"
                }
              }
            }
            
            provider "bitbucket" {
              username = var.bitbucket_username
              password = var.bitbucket_token
            }

             

             

            Konstantin Frank added a comment - I have a workaround for people using Bitbucket and Atlassian:   You can make call to Atlassian API with email to get Atlassian user ID:   https://<your_workspace_name>.atlassian.net/rest/api/3/user/search?query=<email address>   you will get json that has Atlassian user ID , that you can use for Bitbucket API to get bitbucket user UUID https://api.bitbucket.org/2.0/users/ <Atlassian user ID > it's not documented , but in this request  you can put not only Bitbucket uuid but Atlassian user ID too. you will get json with Bitbucket UUID as answer terraform : data "http" "atlassian_request" { url = "https: //${ var .workspace_name}.atlassian.net/ rest /api/3/user/search?query=${ var .user_email}" request_headers = { authorization = "Basic ${base64encode(" ${ var .atlassian_cred_mail}:${ var .atlassian_cred_token} ")}" } } # get bitbucket user uuid data "bitbucket_user" " default " { uuid = jsondecode(data.http.atlassian_request.response_body)[0].accountId } output "uuid" { value = data.bitbucket_user. default .uuid description = "bitbucket user UUID" } terraform { required_version = ">= 0.15" required_providers { bitbucket = { source = "DrFaust92/bitbucket" version = "2.40.1" } http = { source = "hashicorp/http" version = "3.4.2" } } } provider "bitbucket" { username = var .bitbucket_username password = var .bitbucket_token }    

            I need this for automate review 2FA as well.

            Stefan Höltker added a comment - I need this for automate review 2FA as well.

            John Capps added a comment -

            I need this for automated access review as well. 

            John Capps added a comment - I need this for automated access review as well. 

            SMEREDITH added a comment -

            This feature is definitely required for large corporations that need to associate the Bitbucket users with their corporate Identifies for compliance purposes. We have specific groups within Bitbucket which are tightly controlled for compliance and have a requirement to perform Quarterly audits of membership in these groups. Our current user base is large so we want to develop automation to pull this data. We are currently able to generate the group members using the Bitbucket API but the result set does not include anything that can be tied to their corporate ID (i.e. corporate email).

            SMEREDITH added a comment - This feature is definitely required for large corporations that need to associate the Bitbucket users with their corporate Identifies for compliance purposes. We have specific groups within Bitbucket which are tightly controlled for compliance and have a requirement to perform Quarterly audits of membership in these groups. Our current user base is large so we want to develop automation to pull this data. We are currently able to generate the group members using the Bitbucket API but the result set does not include anything that can be tied to their corporate ID (i.e. corporate email).

              Unassigned Unassigned
              f6d4dc412ba0 Lavanya K
              Votes:
              16 Vote for this issue
              Watchers:
              13 Start watching this issue

                Created:
                Updated: