Help with this ERROR : Not authorized. Please check the properties sonar.login and sonar.password

Hi,

I’m trying to integrate SonarQube with Azure Devops. I have done the configuration in the SonarQube administrator ( Administration > Configuration > General Settings > ALM Integrations , select the Azure DevOps tab, and click the Create configuration button) and setup the service connection in Azure Devops.
Also configured the SonarScanner properties file.

sonar.projectkey= Project
sonar.projectName= Project name is given
sonar.login = token from SonarQube

Verified the Sonar-scanner using cmd command “sonar-scanner -h”. The sonar-scanner.bat file also has successfully executed.
In Azure devops Build pipeline, have configured the branch - Prepare Analysis Configuration, Run Code Analysis and Publish Quality Gate Result. When we run the pipe it fails with the below error.

ERROR: Not authorized. Please check the properties sonar.login and sonar.password.

ERROR: Error during SonarScanner execution

ERROR: Not authorized. Please check the properties sonar.login and sonar.password.

INFO: ------------------------------------------------------------------------

##[error]ERROR:

ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.

ERROR:

Below are the last lines of the log
“GET /batch/file?name=sonar-scanner-engine-shaded-9.0.1.46107-all.jar HTTP/1.1” 200 - “-” “ScannerCLI/4.6.1.2450” “AXtcvnCkoRmL3dzQAADB”
“GET /api/settings/values.protobuf HTTP/1.1” 401 - “-” “ScannerCLI/4.6.1.2450” “AXtcvnCkoRmL3dzQAADC”

Kindly help me with the above error. Thanks in Advance.

Hey @shaik_idris,

First of all - apologies for the delay in getting back to you.

I have a few questions for you, that could better help me diagnose where the issue lies:

  1. Which Azure DevOps version are you using? Is it Server or Services?
  2. Is your pipeline configured with a yaml file? If so, could you share if with me (obfuscating secrets)?

Kind regards,
Belén