We are currently experiencing issues with Bitbucket Cloud authentication in SonarQube (version 9.9.2

Hello SonarSource Community,

We are currently experiencing issues with Bitbucket Cloud authentication in SonarQube (version 9.9.2 LTS).

Context:

  • SonarQube is deployed behind Nginx with HTTPS enabled.

  • OAuth configuration with Bitbucket is correctly set (client ID/secret, redirect URI).

  • Server base URL is configured as:
    https://sonar.afphabitat.net

Issue:
During login attempts, we observe the following in the logs:

  • invalid_grant error during OAuth token exchange

  • Warnings related to:
    CHANGE-2770 - Functionality has been deprecated

Specifically:

  • SonarQube fails when trying to retrieve Bitbucket teams/workspaces.

  • This appears to be related to recent Bitbucket Cloud API deprecations.

Workaround applied:

  • We removed the “Workspaces” restriction in SonarQube authentication settings.

  • We disabled automatic user sign-up to maintain access control.

With this workaround:

  • Authentication now works

  • But we lost the ability to restrict access based on Bitbucket workspace membership

Questions:

  1. Is SonarQube 9.9.2 officially compatible with the latest Bitbucket Cloud API changes (CHANGE-2770)?

  2. Is there a recommended configuration to enforce workspace-based access control with current Bitbucket APIs?

  3. Is this limitation only resolved in newer SonarQube versions or via plugin updates?

We are planning an upgrade, but would like to confirm the best approach and avoid regressions.

Thanks in advance for your guidance.

Best regards,

Hi,

Welcome to the community!

Your version is past EOL. You should update to either the latest version or the current LTA (long-term active version) at your earliest convenience. Your update path is:

9.9.2 → 2025.1.4 → 2026.2

You may find these resources helpful:

If you have questions about updating, feel free to open a new thread for that here.

Upgrading will solve your error because it switches away from the API that Bitbucket stopped supporting on April 15th.

 
HTH,
Ann