Migrating a SonarQube Cloud organization to a new Azure DevOps organization while preserving history

ALM used

Azure DevOps

CI system used

Azure DevOps Pipelines

Scanner command used

Not applicable (using the Azure DevOps extension).

Languages of the repository

C# (.NET)

SonarQube Cloud project URL

Private organization (URL not publicly accessible).

Error observed

No error is occurring.

This is a migration planning question.

Current setup:

  • SonarQube Cloud organization: endiprev
  • Azure DevOps organization: endiprev

Target setup:

  • Azure DevOps organization: muehlhan
  • SonarQube Cloud organization renamed to: muehlhan

Our goal is to preserve:

  • Analysis history and metrics
  • Issues and their statuses
  • Comments and resolutions
  • Quality Gate history
  • Project configuration and settings

We would like to know:

  1. Can an existing SonarQube Cloud organization be disconnected from one Azure DevOps organization and connected to another?
  2. If so, will the complete project history be preserved?
  3. Can SonarSource Support perform or assist with this migration?
  4. Are there any prerequisites, limitations, risks, or expected downtime?
  5. Should the SonarQube Cloud organization be renamed before or after changing the Azure DevOps organization binding?

Steps to reproduce

Not applicable. This is a migration planning request rather than a reproducible issue.

Potential workaround

Creating a new SonarQube Cloud organization and reimporting the projects, but we would like to avoid losing historical data. Is there an officially supported alternative?

Hi @cnevesEndiprev. Welcome to the community.

It’s not possible to unbind nor change the binding of a SonarQube Cloud organization bound to an Azure DevOps organization (this is documented here and here and discussed previously in this community post). Can you tell me more about your use-case for needing this?

There’s an open feature request to add the ability to change organization bindings in SonarQube Cloud – I invite you to add your voice to that feature request.

Creating a new SonarQube Cloud organization and reimporting the projects, but we would like to avoid losing historical data.

This is a potential workaround, and you are correct about he limitation of this approach: project history from the old SonarQube Cloud organization isn’t preserved in the new SonarQube Cloud organization.

You can of course continue to pay for the old organization so that you can maintain analysis history of it’s private projects. And, if you were to upgrade to an Enterprise plan, you could add both the new and the old organization to the enterprise.