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

Hello. I have around 20 projects running and executing analysis. Suddenly one project that has been working for a long time starts to throw an error:

ERROR: Error during SonarScanner execution
##[error]You’re not authorized to run analysis. Please contact the project administrator.

I set up debug mode and it seems the post-call to Sonarcloud is throwing a 403. I checked permissions and the user that setup the job (which is myself) has Execute Analysis permissions.

The post call that is throwing errors is (I changed the organization / project_key / project_name values because of privacy):

DEBUG: POST 403 https://sonarcloud.io/api/ce/submit?organization=XYZYX&projectKey=PROJECT_XYZ&projectName=PROJECT_XYZ | time=526ms

Please let me know how to proceed.

Hi,

Can you verify that the token used for analysis of that project is either not revoked and/or the same one that’s used for the projects that still succeed?

 
Ann

Hi. I’ve verified the token is valid. I’ve even created a new token and setup that token in the Azure build pipeline. But problem persist.

Hello @caraujo84,

I started a private thread with you, so you can pass me the organization and project key in secure manner.

Best,
Marcin

1 Like

Hello @caraujo84,

Can you retry the analysis? Do you still experience the issue?

Best,
Marcin

@Marcin_Majewski @ganncamp we had this problem also for last 2 days but only in 1 repo (out of 20 repos) and only for analysis on ‘master’ branch, not for PR branches. It’s working now for us too. What was the root cause?

Hi @Marcin_Majewski - the error disappeared (with no changes from our side). We are good now.

Thanks!

@Marcin_Majewski @ganncamp any comments on my question?

Hello @bparthas21,

We deployed a new firewall recently and unfortunately, one rule blocked one of your analyses. The impact was very low and we did revert the change. We will do a thorough investigation before moving forward and re-enabling rules.

Best,
Marcin

Hi everyone, we are experiencing similar error. In my team, we are trying to use Jenkins file to run pipeline and at SonarQube stage we get this error, hence our pipeline failed. We ran the generated maven build from Sonarqube manually and it was a successful build. Kindly revise the solution that worked for original poster.

Thank you

Hi @adegokeobafemi,

Please create a new thread with full details of what you’re experiencing including copy/pasted text of the relevant logs.

 

Ann

Ok. Thank you