Authentication Error using Token and SonarScanner.MSBuild.dll

Hello support team,

  • SonarQube 7.9.5
  • scanner: SonarScanner.MSBuild.dll, version
  • Scanner cannot connect to SonarQube
  • Command in use:
    dotnet C:\sonar-scanner-msbuild-\SonarScanner.MSBuild.dll begin /k**:**:v3.3 /n:"vx.y" /v:x.y.z /d:sonar.verbose=true /d:sonar.login=

Server appends to log:
access.2022-01-18.log: - - [18/Jan./2022:15:18:58 +0100] “GET /api/editions/is_valid_license HTTP/1.1” 401 - “-” “-” “AX5ou1qVYwHQPBz6AANj”

The sonar.login is provided as a token.
Tokens for 2 different users have created tokens:

  • a role-specific user (jenkins)
  • an admin user (myself)

The token stored in jenkins only consists of the plain token. No username is prepended to the token in jenkins.

In jenkins, the tokens have been stored as “secret text” instead of “username and password”.

Unfortunately, I’m currently not able to re-run the request using postman because I don’t know the content of the request to send.

Can you already provide help, or do you require additional information?

Best regards


Welcome to the community!

First, your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

7.9.5 → 8.9.6 → 9.2.4 (last step optional)

You may find the Upgrade Guide and the LTS-to-LTS Upgrade Notes helpful. If you have questions about upgrading, feel free to open a new thread for that here.

If your error persists after upgrade, please come back to us.