No repositories found for this organization - private repository

Hi there,

I’m having the problem of “No repositories found for this organization”.

I already tested the PAT as commented on "No repositories found for this organization"

As our repositories are private, only worked when I put the parameter “includeHidden=true” on link Fetch repositories. Only when I included this that I saw a return different than “{“value”:,“count”:0}” and returned the expected result.

Suggested test: https://dev.azure.com/{AzureDevopsOrg}/{projectId}/_apis/git/repositories?api-version=6.0

My test: https://dev.azure.com/{AzureDevopsOrg}/{projectId}/_apis/git/repositories?includeHidden=true&api-version=6.0

reference: Repositories - List - REST API (Azure DevOps Git) | Microsoft Learn

Could someone please take a look?

Can I only add public repositories from Azure?

Hi,

Welcome to the community!

What’s the context you’re seeing this in?

 
Ann

“Analyze projects - Select repositories”

Hi,

Thanks for the screenshot.

I’m going to flag this for more expert eyes.

 
Ann

1 Like

Hi Gustavo,

I confirm you should be able to add private repositories if you are under a paid plan.

And Indeed we are making this request when we fetch the list of repositories: https://dev.azure.com/{AzureDevopsOrg}/{projectId}/_apis/git/repositories?api-version=6.0

This request fetches both private and public repositories.

Did you also try to fetch the list of repositories from your browser, after logging in to AzureDevops? Do you get the same result ?
If yes, the issue is probably on your repo set-up.
If not, then you have an issue with the configuration of your PAT token.

Hi Nolwenn,

After your comment, I tested a bit more and I know what is going on.

All our project’s version control are on TFVC, not Git

Do you guys only have API for git?

tfvc api: https://learn.microsoft.com/en-us/rest/api/azure/devops/tfvc/items/list?view=azure-devops-rest-7.0&tabs=HTTP

thanks.

Hi Gustavo,

Thanks for sharing your findings!
Unfortunately, as of now, we only support Git projects.

Hi Gustavo,

To complement on my previous answer, we only support Git projects for bound projects on AzureDevops. You can manually import your TFVC projects and they will be analysed by SonarCloud.

1 Like

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