Bitbucket integration with DevOps Change Velocity

  • Release version: Xanadu
  • Updated July 31, 2025
  • 3 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of Bitbucket integration with DevOps Change Velocity

    DevOps Change Velocity enables ServiceNow customers to integrate Bitbucket repositories, commits, branches, and pull requests into their DevOps workflows. This integration supports the Code (Repository) capability, allowing enhanced tracking and visibility of Bitbucket activities within ServiceNow.

    Show full answer Show less

    Authentication Methods

    ServiceNow supports several authentication methods to connect to Bitbucket Cloud, each requiring specific configurations and permissions:

    • Basic Auth: Use a Bitbucket username and app password. The app password must have permissions for Account Read, Projects Read, Webhooks Read and Write, and Pull Requests Read. This method discovers repositories across all workspaces in the organization.
    • OAuth 2.0 - Authorization Code: Requires creating an OAuth consumer in Bitbucket with similar permissions as Basic Auth. The consumer must not be marked as private. The ServiceNow instance URL must be set as the callback URL. This method also discovers repositories across all workspaces due to Bitbucket limitations.
    • OAuth 2.0 - Client Credentials: Requires creating a private OAuth consumer in Bitbucket with the required permissions. The client ID and secret are used for authentication, with the ServiceNow instance URL as the callback URL. This method is configured during onboarding in the workspace UI.
    • Access Token: Generated following Atlassian guidelines with necessary permissions. The workspace ID from Bitbucket is also required for setup.

    Onboarding Bitbucket Integration

    ServiceNow provides multiple options to onboard your Bitbucket instance into DevOps Change Velocity depending on your preference for user experience:

    • Workspace UI: A guided process to create, connect, discover, and configure Bitbucket integration.
    • Service Catalog: Use the ServiceNow Service Catalog to onboard Bitbucket.
    • Classic UI: Use the Classic experience to connect and configure Bitbucket.

    Practical Benefits for ServiceNow Customers

    This integration enables comprehensive tracking of Bitbucket repositories and development activities within ServiceNow, improving visibility, traceability, and collaboration in software delivery processes. By choosing the appropriate authentication method and onboarding path, customers can seamlessly connect Bitbucket with their DevOps Change Velocity environment and leverage real-time insights into code changes and pull request statuses.

    Connect to your Bitbucket instance to track Bitbucket repositories, commits, branches, and pull requests.

    Bitbucket integration overview

    DevOps Change Velocity supports the Code (Repository) capability for the Bitbucket tool.

    Authentication methods

    You can connect to Bitbucket Cloud using one of the following authentication methods:

    Basic Auth
    When you select the credential type as Basic Auth the repositories for all the workspaces in the organization are discovered. You can get the user name and password for Basic Auth from the settings of your Bitbucket account. To copy the user name, navigate to Settings > General > Account settings, and copy the user name from the Bitbucket profile settings section. To copy the password, navigate to Settings > Personal Bitbucket settings > App passwords, and select Create app password. Enter the necessary details and select the required permissions, and then select Create, and copy the password. The following permissions must be selected while creating the credentials:
    • Account: Read
    • Projects: Read
    • Webhooks: Read and write
    • Pull requests: Read
    Permissions for Bitbucket basic auth
    OAuth 2.0 - Authorization Code
    You must create the OAuth consumer in the Bitbucket tool with the required permissions before creating the OAuth record for Authorization Code. You can navigate to Workspace settings > OAuth consumers > Add consumer in Bitbucket to add the OAuth consumer. OAuth consumer page Select the following permissions for the OAuth consumer.
    • Account: Read
    • Projects: Read
    • Webhooks: Read and write
    • Pull requests: Read
    Ensure that the This is a private consumer option isn’t selected. You must enter your ServiceNow instance URL in the Callback URL field in the following format.
    https://<instanceurl>/oauth_redirect.do
    Permissions for Bitbucket OAuth 2.0 - Authorization Code

    You can create an OAuth 2.0 - Authorization Code credential by performing the steps specified in the Set up OAuth 2.0 Authorization Code for Bitbucket Cloud procedure.

    Note:
    When you select the credential type as Oauth 2.0 - Authorization Code for Bitbucket Cloud, the repositories for all the workspaces are discovered. This is a limitation from Bitbucket side
    OAuth 2.0 - Client Credentials
    You must create the OAuth consumer in the Bitbucket tool with the required permissions before creating the OAuth record for Client Credentials. You can navigate to Workspace settings > OAuth consumers > Add consumer in Bitbucket to add the OAuth consumer. OAuth consumer page Select the following permissions for the OAuth consumer.
    • Account: Read
    • Projects: Read
    • Webhooks: Read and write
    • Pull requests: Read
    Ensure that the This is a private consumer option is selected as well. You must enter your ServiceNow instance URL in the Callback URL field in the following format.
    https://<instanceurl>/oauth_redirect.do
    Permissions for Bitbucket OAuth 2.0 - Client Credentials
    You can create an OAuth 2.0 - Client Credential record in the workspace UI while onboarding the tool. You need the Client Id and Client secret values of your Bitbucket workspace. Client ID of your Bitbucket tool is available in the OAuth consumers section of your workspace settings (Workspace settings > OAuth consumers > Add consumer) in the Key field. Client secret of your Bitbucket tool is available in the OAuth consumers section of your workspace settings (Workspace settings > OAuth consumers > Add consumer) in the Secret field. OAuth consumer page
    Access Token
    You can create the access token by performing the steps specified in the Atlassian documentation. Ensure that the following permissions are provided while creating the access token:
    • Account: Read
    • Projects: Read
    • Webhooks: Read and write
    • Pull requests: Read
    Create Access Token in Bitbucket

    You also need the workspace ID of your Bitbucket workspace. Copy it from the Workspace ID field in the Workspace settings of your Bitbucket Cloud account.

    Get started

    Use one of the following options to onboard Bitbucket. For a guided experience, use the workspace to onboard a tool. Alternatively, you can use the Service Catalog or Classic experience.