I am not able to see my project in the sonar cloud when I click on ananlyzie new project

Here is the project:

image

but i am not seeing the project in the sonar cloud.

I am using same account for sonar cloud and also for azure devops

Please suggest

Hey there.

Whatever the account you’re using to login, it will be important that the token being used by SonarCloud (organisation-level Administration > Organization settings > Azure DevOps Connectivity Managmement has access to those repositories.

Perhaps you can try provisioning a new token from your account and using it in the above mention setting?

In Azure DevOps, the SonarCloud user need to have access to the Project.
A repos is not listed when the sonarcloud user is not assigned to the Azure DevOps project.
To verify if it is assgined go to Project Settings - Permissions - Users.
To assign go to Organization Settings - Users - select SonarCloud user - Manage user - add the repo that need access.
SonarCloud user need at least to have a Basic access level.

Hi Colin,

Thank you for the response.

As per your suggestion, I have navigated azure devops organization → new token and provided the code read and write access

and I have tried to use that token in sonarlcoud as below, but I am getting following error.

Please suggest further

Hi sk, With wich user did you create the token? Is it a sonarcloud admin user?

@sk8228402 Please make sure that you invalidate the token you shared a screenshot of. This is a public community forum. You should consider this token compromised.

Hi Kokonda,

Thank you for the respose

It is project collection admin user.

The best is to follow exactly the documentation, specially the part where it is explain how to set the PAT at the organization level. SonarCloud doc and It is better to configure a technical user.

And the other point is as mentioned before
To verify in Azure DevOps, if the technical user is assigned to projects that needs to be imported .
To assign go to Organization Settings - Users - select SonarCloud user - Manage user - add the repo that need access.
SonarCloud user need at least to have a Basic access level.
Capture

HI Kokand,

Organization is already there

Did you check on the Azure DevOps side in Organization Settings. Are you sure that the projects are marked as accessible for the SonarCloud user. By default in Azure DevOps there is no project and no repos that can be imported.
Could you show us by screen shot which projects are marked as accessible. if some repos are really [:heavy_check_mark:] selected then we can clarify this part first. Hide sensitive project name.

Remark: do not create another organization. The organization is created only once.

Hi Kokand,

I have tried to select project as below for respective organization, however I am not finding any project although projects are available in the Azure DevOps organization. Please refer following screenshot.

Hello, I would says that’s normal if you do not see any projects.
You have to configure the user from Azure DevOps side first (Manage User) if you want to see a list of projects from SonarCloud side.

Example:

  • You will not see the Sandbox repo from SonarCloud
    Capture-User-NoAccess

  • You will see the Sandbox repo from SonarCloud
    Capture-User-WithAccess