SonarCloud Analyze project missing repositories from AzureDevOps

I am using SonarCloud and it is connected to the organization (AzureDevOps).

When I try to add a new project to SonarCloud:

I go to the plus sign and then a list appears with the repositories from AzureDevOps.
The issue that I am facing is that not all the repositories appear on the list. I am trying to understand what is the condition from when a repository shows up VS when it doesn’t, but I still can’t identify the reason/condition.

Is this a bug? What could I do to see all the repositories? Is manually importing the only thing I can do for the missing ones?

Any help is really appreciated.

Hi @caraujo84

We don’t have any condition on our side, we just rely on the token you provided to list the repositories, using the list repositories API provided on AzDo. Is there some kind of specific/granular permission set on your repositories that you don’t see maybe ?


Hi Michaël, it could be that. I’ll troubleshoot with the AzureDevOps admin and see if that fixes this thing. Thank you.

Hi @mickaelcaro . We are still having this issue and we don’t see major differences in terms of permissions. Does the service SonarCloud use to pull the repositories have a max number of results(repositories) restriction?

We have a big number of repositories within our organization.

Ah, indeed, that might be that. i think we pull only the first 100 results or so.


I see. @mickaelcaro any way to pull a repository that doesn’t come from the list?

Not for the moment, we have a ticket opened internally to address that, but no ETA to give you yet.

Sorry for the inconvenience.


Hi @mickaelcaro. I have two questions for you on this topic.

  • Any updates on the ETA? In our organization, we have close to 1000 repositories, and not having the wizard option could be a deal-breaker for us.
  • Is there any difference in SonarCloud functionality by importing a project manually vs through the wizard?


Hi @caraujo84

No update on the ETA : but i think the biggest problem we’ll face here is that the API we call to retrieve repositories is not paginated, so not sure if we can figure this out right now, we’ll have to check with MS support directly.

The only difference will be that your manually created project’s won’t benefit from the organization-wide PAT for PR decoration, meaning that you will need to put a PAT on each project’s setting. Apart from that, this is pretty much the same experience.


Hi @mickaelcaro.

Is this issue fixed? Same issue here? Azure DevOps - importing repo - cannot see specific project's repos - #7 by TomVanBraband

We are in a test phase for using SonarCloud. Our organization has aprox 170 projects and 450 repos.
SonarCloud imports only 212 repos, so a lot is missing. I can’t find any (azure) user policy causing this.

I can manually create projects as proposed, but its a work around…

In Azure devops api you might set a max return count.$top=350

I would guess the default value, max 100 projects, is to small for a lot of organizations using “paid plan”.


Hi @endre and welcome to the community.

Projects are now paginated, so you should normally see them all in the list.

Concerning the repos, that’s another story, we’re currently reviewing which kind of solution we can come up with, since the API doesn’t offer such possibility.


Thx for the reply, but…
Only 58 of 170 projects are listed. So 2/3 of our projects are not listed. :slightly_frowning_face:
Any idea why?

Pagination looks like a UI feature, as only one request to list_repositories is submitted.

I guess we can manuelly set them up, but is a workaround and SonarCloud does give a warning. And all users are new and unknown to SonarCloud.

Manual setup is not recommended, and leads to missing features like appropriate setup of your project or analysis feedback in the Pull Request.

We do have aprox 450 repos from 170 projects in Azure DevOps.
SonarCloud only lists 212 repos from 58 projects.