Sonarqube Quality Gate status link in Azure devops Pull Request always points to localhost

The Quality gate status url in a PR is always pointing to localhost and not to the actual sonarqube server.
The detailed analysis report link in the build pipeline is working fine.

  • SonarQube 7.9 Developer Edition, Scanner Latest from Marketplace

  • Create a PR request and trigger a Build with Sonar Analysis.

  • Add a Build policy to validate Sonar Quality Gate

  • Click on the link. It routes to localhost and not the actual server.

Hi @smaran and welcome to the community !

What do you mean by “not the actual SonarQube server” ?

The url reflected in the link is normally the one setup on the Service Connection

Could you check that ?



The link routes to localhost instead of the one defined in the service connection


Thanks. In fact, i made a mistake in my previous answer.

The url that is written to this link is the one setup on the sonar.core.serverBaseURL property, either in your file or in the UI, in the administration part of your SQ instance.



Is happening the same to my setup.

  • Developer Edition
  • Version 7.9.1 (build 27448)
  • azure devops cloud version

Links provided un PullRequest page:
and sonar.core.serverBaseURL in sonarqube server is properly setup.

So, any clue? Maybe a bug in the Sonarqube version?

Hi @aldodfm,

What is wrong with that url ?


Hi @mickaelcaro,

my sonar.core.serverBaseURL is and the link provided in Azure DevOps PullRequest :
is like this: https://dashboard/?id=dms.dms-front&pullRequest=39355
when it must be



Where did you set your sonar.core.serverBaseURL property ? In the UI ? Or via the base file ?

1 Like

Hi Michael,

I am too facing the same issue as @smaran and I have a enterprise edition.
When I click on “Quality Gate failed” hyperlink, it takes me to http://localhost/dashboard?id=***&pullRequest=952.

Ideally it should point to the server where I have my sonarqube hosted.
I don’t want to maintain file, so I updated in “Prepare analysis on SonarQube” task in advance section as below:
If this is not correct, could you please confirm where else the changes are required.


Hi @smaran and @mickaelcaro,

I found the resolution for this we need to go into Administration > General > Server base URL update the ‘Server base URL’. on sonarqube portal.


1 Like


Solution from my colleagues:

There was a not specified variable in SonarQube config file that overrides the serverPath value in SonarQube.

We comment this variable in config file and now serverPath gets its value from database (configuration in SonarQube administration).

Now it works as expected.

See you! :smiley: