ERROR: You're not authorized to run analysis. Please contact the project administrator


I am trying to run the code analysis using sonar cloud.
when i run the analysis i’m stuck at the error saying “ERROR: You’re not authorized to run analysis. Please contact the project administrator.” ,
Seems like the analysis report is generated and when it’s trying to upload the analysis report to sonar cloud the execution is getting failed with the error.
Please suggest how to overcome this error and run the analysis successfully.

Command used to run the analysis : sonar-scanner -X -Dsonar.projectKey=ajaykumar0794_Sonar-Scanning-Examples

I tried multiple options as below for this error and not able to resolve.

I’ve tried added file in my repository with the below details, still getting the same error.
-Dsonar.login=XXXXXX(Encrypted Key)

I’ve tried giving all the permissions to run the analysis in sonar cloud(Organisation-Adminstration-Project Management,Permissions) and in my Azure repository too. Still no luck.


First make sure the user who created the token passed to sonar.login has the “Execute Analysis” permission (in the administration->permissions menu of your project).

The properties in shouldn’t start with -D. So instead you should have
Also sonar.organizationKey should be replace by sonar.organization.

Let me know if this helps!

Hi Benoit,

I tried running the sonar analysis by updating the sonar properties file as you suggested and checked the permissions too, But still getting the same error.

I missed that in your first message but your file should be named and not

Hi Benoit,

I’ve tried running the analysis after editing the properties file as you suggested, the execution is success and able to see the analysis on the cloud too.

Thanks a lot for the quick help and support.

Command Used to run the analysis:
sonar-scanner -X -Dsonar.projectKey=Sonar-ABAP-Test-New

Hi @benoit,

I’m facing the same error while running the sonar scan through Jenkins for a maven project.

I’ve tried giving the required access in the project level, replaced - to too.

I’m running the through ‘Execute sonarqube scanner’ module in Jenkins.
Properties mentioned so far:


Please let me know what went wrong in this.

Hi @Sudhir @t.ajaykumar,

Sorry for the late response.
I think you are missing the sonar.organization property.
I see that this parameter is missing from the documentation, I will add it.

Let me know if that fixed your error.

Yes, even I have figured out the same and resolved the issue now.

Anyways thank you for the response. :slight_smile:

@benoit I get the same error but my problem was different I was sending a project key that was already taken, I have changed that and it worked. The problem here is sonarcloud is not giving any clue about the problem instead it directs you to a wrong path by saying it is an authorization issue.

1 Like

I completely agree with the commentator above. My problem was that I changed the paths to the sources and tests. And wrote the authorization problem, although this is not so

Hi @benoit,

I’m also facing the same issue:
file for sonar properties:

also have mentioned the sonar.organization in the file as shown below:


the command used for execution:
dotnet tool install --global dotnet-sonarscanner --version 5.2.0

dotnet sonarscanner begin /k:xxxx / /d:sonar.login=${SONAR_USER} /d:sonar.password=${SONAR_PW} /d:project.settings=C:\xxxx\

dotnet sonarscanner end /d:sonar.login=${SONAR_USER} /d:sonar.password=${SONAR_PW}

ERROR: Error during SonarScanner execution

( You’re not authorized to run analysis. Please contact the project administrator.

thanks in advance