Access is denied due to invalid credentials. Please check the authentication parameters


I want to try SonarQube so I followed the installation steps and I have it running (v10.0.0.68432).

My project is a .NET Framework project, so I downloaded sonar-scanner-msbuild-

Then I created a local project in Sonar and tried to analyse the project locally.

Sonar created a token and gave the command line to run the analysis:

SonarScanner.MSBuild.exe begin /k:"test-project" /"http://localhost:9000" /d:sonar.token="sqp_e3c63b69f79d19879f53f88ae62bfcb755746fe5"

When I run this I get the following output:

SonarScanner for MSBuild 5.13
Using the .NET Framework version of the Scanner for MSBuild
Pre-processing started
Preparing working directories...
Unauthorized: Access is denied due to invalid credentials. Please check the authentication parameters.
Pre-processing failed. Exit code: 1

I tried this using both Sonar on Docker and installed locally. I confirmed the token exists in Sonar. I also tried using a user token instead of a project token and I always get the same output.

How can I diagnose this?


Welcome to the community!

I’m going to assume you’ve already revoked and replaced the permissions token you just published to the internet. :smiley:

Regarding your question…

  • The first thing I would try is removing the quotes. There are no spaces and no special characters, so they shouldn’t be needed, and I’m not confident they would be stripped automatically
  • Next, if you’ve already validated that the token value is correct (no copy/paste flubs) then I would check that the user the token is from has rights to analyze the project.

If neither of those works, come back to us and… we’ll see what else we can figure out.


Hi, thanks for the reply. What actually happened is that I needed to unblock the downloaded zip of SonarQube. Since the zip file opened normally, I assumed that Windows didn’t block anything.

1 Like