Pull request status check SonarCloud quality gate

I need some advices to properly configure my azure devops CI to have the sonar cloud quality gate prevent PR to be merged when failing.
I followed several tutorials found right here without success : the check is still ‘waiting’ in my azure devops PR.
To help me, is somebody can explain me how th PR is decorated with the result of the quality gate ?
Is it the azure devops task named SonarCloudAnalyze which is adding it during the build or is sonarcloud have to push the result of its analysis by an another way ?

I have found some topic similar to mine (ex: Pull request status check SonarCloud quality gate no longer working - #8 by W0GER) but i don’t see any token configuration in my sonarcloud project .

I have a task id if it helps : AXexzaKQEWiiWykwLQr-

Thanks for any help

  • ALM used (Azure DevOps)
  • Azure DevOps
  • Languages of the repository c#

Hi @CedricConnes and welcome to the community !

The Pull Request decoration is made from SonarCloud to Azure DevOps, this is the reason why SonarCloud needs a Azure DevOps PAT to be able to communicate.

You have 2 solutions for that : If you bind your SonarCloud organization to Azure DevOps, the token you fill at the beginning will be used (you also need to import your repo and create a project for that).

If your organization has been created manually, then you need to fill your Azure DevOps PAT in the project’s setting to activate this decoration.

Can you give me a timestamp when you executed the analysis with this background task id please ?


Thanks for your help.
The analysis wa realized February 17, 2021 10:02:59 PM.

If my organization has been manually created or bound to github instead of Azure DevOps, i still have a way to provide a PAT to activate the decoration ?


No, you should bind your org with the ALM where you code is hosted, otherwise, you will not have any pull request decoration.

How i unbind my organization to rebind it to azure devops ?