Sonar Cloud - (Azure DevOps) Few projects missing when analyzing new project

  • ALM used: Azure DevOps
  • CI system used: Azure DevOps
  • Languages of the repository: We’ve multiple repositories with different languages like angular, .NET core etc…

Context:

We have 70+ projects and around 500+ repositories in them within a same Azure DevOps organization.
We’re using Sonar Cloud Enterprise license for it and we’re are already analyzing projects with it and working fine.

Problem:

Few of the projects are not reflecting when trying to add a new project/ repository from ‘Analyze new project’ screen.

Just a heads-up: the project (which I’m looking for and isn’t currently visible) was migrated from a different Azure DevOps organization. However, some other projects that belong to the current Azure DevOps organization are also not visible.

Is there any limit to the number of projects or repositories that can be displayed there?
Any guidance or help would be appreciated.

Hi @naman.goyal,

It’s likely that the user or token currently bound to your Azure DevOps organization doesn’t have access to the relevant projects or repositories. You can resolve this by replacing the token in Administration > Organization settings > Organization binding at the org level.

SonarQube Cloud uses this token to perform API requests such as:

GET https://dev.azure.com/{organization}/_apis/projects

followed by:

GET https://dev.azure.com/{organization}/{project}/_apis/git/repositories?api-version=7.1

You can test with your current token using these APIs to verify whether the necessary projects and repositories are returned.

For more details, see: Cannot access Azure DevOps API using PAT in cURL command in Bash script - Stack Overflow

Note: SonarQube Cloud will not display repositories marked as disabled (i.e., repositories where "isDisabled": true in the API response).

FYI…
The user didn’t have permission for specified project, from which the token was created. Now am I’m able to see the projects.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.