SonarCloud Binding Error – GitHub Organization “genai-alpha” After Migration to GitHub Enterprise

:small_blue_diamond: Which versions are you using?

  • SonarCloud (SaaS)

  • GitHub Enterprise Cloud

  • SonarCloud GitHub Action in GitHub Workflow pipeline


:small_blue_diamond: What are you trying to achieve?

We are trying to rebind our existing SonarCloud organization to our migrated GitHub Enterprise organization “genai-alpha” after completing a GitHub organization migration.


:small_blue_diamond: What have you tried so far?

Context:

  1. Initially, we had a GitHub organization named “genai-alpha” successfully bound to SonarCloud.

    • GitHub Actions pipelines were publishing code analysis results to SonarCloud without issues.
  2. We upgraded to GitHub Enterprise Cloud.

  3. During migration:

    • All repositories were migrated from GitHub org “genai-alpha” to a temporary GitHub Enterprise org “genai-alpha-temp”.
  4. To retain the original organization name:

    • The old GitHub org was renamed to “genai-alpha-legacy”

    • The new GitHub Enterprise org “genai-alpha-temp” was renamed to “genai-alpha”

    • This is now our active GitHub Enterprise organization used by development teams.

  5. On SonarCloud:

    • We removed the GitHub binding from the old org (“genai-alpha-legacy”)

    • We are now attempting to bind the existing SonarCloud organization to the new GitHub Enterprise org “genai-alpha”


:small_blue_diamond: Current Issue

  • The SonarCloud GitHub App installs successfully on the new GitHub org “genai-alpha”

  • However, the binding process does not complete on the SonarCloud side

  • As a result:

    • GitHub Actions Sonar scan pipeline fails

    • Analysis results are not published to SonarCloud


:small_blue_diamond: Error Observed

On Sonar Cloud Binding the status circle keeps moving for long time and fails with error “The request cannot be processed, Try again letter

GitHub action pipeline fails on Sonar scan with error
Error: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar (default-cli) on project notification-hub: Something went wrong while trying to get the pullrequest with key ‘162’: Error 500 on https://sonarcloud.io/api/alm_integration/show_pullrequest?project=genai-alpha_notification-hub&pullrequestKey=162 : {“errors”:[{“msg”:“An unexpected error occurred. Please try again later.”}]} → [Help 1]

Hi Gautam,

This looks like a classic edge case caused by organization renaming + migration + rebinding timing conflicts between GitHub Enterprise and SonarCloud. We faced a similar situation after an enterprise migration, and the issue was related to stale bindings and cached org mappings on SonarCloud’s side.

A few things you can try:

  • Completely uninstall the SonarCloud GitHub App from both the legacy and new organizations.

  • Wait 10–15 minutes to allow GitHub + SonarCloud caches to clear.

  • Reinstall the GitHub App and retry the binding process.

  • If the issue persists, raising a support ticket with full migration details is usually the fastest way to get the backend mappings reset.

You can also visit if you want to explore additional troubleshooting resources and guides that may help during GitHub + SaaS platform migrations.

Hope this helps, this type of issue is frustrating but usually solvable once backend mappings are refreshed.

Hi Zahara S,
thanks for the response , I tried your suggested way (uninstalled → waited → reinstalled) but it didn’t work

Hello Gautam,

Thank you for the question, unfortunately we have a known issue that is likely not allowing you to rebind. We have a fix planned in early Q2 & we’ll keep you posted on it.

Kind regards,

Shubham

Hi Gautam,

This issue usually happens because SonarCloud identifies GitHub organizations by their underlying, immutable GitHub Organization ID (numeric ID) rather than just the organization slug/name.

Even though you renamed your new GitHub Enterprise organization to genai-alpha, its underlying numeric GitHub ID differs from the original organization’s ID. SonarCloud still has metadata and project bindings locked to the old GitHub App installation / internal ID, which causes internal conflicts (HTTP 500 errors on the ALM integration endpoints).

To resolve this binding deadlock:

  1. Uninstall the GitHub App completely: Go to your new GitHub Enterprise organization settings (Settings > GitHub Apps / Installed GitHub Apps) and completely uninstall the SonarCloud app for genai-alpha.
  2. Clear previous ALM connection: In SonarCloud, go to Organization Settings > Administration > Organization Analysis / GitHub Connectivity and ensure any remaining link to the previous GitHub organization is unlinked/revoked.
  3. Re-initiate binding from SonarCloud: Always initiate the flow from SonarCloud (Choose an organization on GitHub). Ensure the account initiating the bind has administrative permissions in both the GitHub Enterprise organization and the SonarCloud organization.
  4. Alternative / Clean Setup: If the organization binding still hangs, you can create a new SonarCloud organization bound cleanly to the new GitHub Enterprise organization, then re-import the projects.

When troubleshooting organizational transitions or deciding between migration strategies, you can test workflow options using click here. Hope this helps clear up the integration lock!