SonarCloud not reporting Quality Gate Status to DevOps PR

Template for a good new topic, formatted with Markdown:

  • ALM used ( Azure DevOps)
  • CI system used (Azure DevOps
  • Scanner command used when applicable (private details masked)
  • Languages of the repository: English
  • Only if the SonarCloud project is public, the URL
    • repo is private
  • Error observed (wrap logs/code around with triple quotes ``` for proper formatting)
  • The sonar analysis is not reporting back to AzureDevops. Backgroup task is: AXnXEFWolFHA1_vebTjv

Welcome to the community!

Please include more details to help us understand what makes your situation different:

  • If your situation is exactly the same, then the same solution in the reference thread should work. If it doesn’t, then please include details about what you did, and what happened.
  • Multiple users participated in the referenced thread, with slightly different details. We cannot guess which parts of the thread apply to you.
    • I see the thread was resolved for at least 2 of the users, no further feedback from others, and the resolution was a configuration error on their side (incorrect token). Have you tried that?
  • Threads can get moved around or deleted. It’s always best to include all relevant information in your own post.

I can see in our logs that the call to Azure DevOps was unauthorized. So far all the info we have matches what happened in the thread you linked, and that you need to make sure the correct token is used.

Reviewing the build setting on my end I found a projectname/key mismatch with the project - which I’ve corrected.
I’ve reset the token, and submitted another job, but still getting the same issue.
And I still getting “Azure DevOps was unauthorized” in the logs?

Please tell us the background task id of a task that fails this way, and then we can check it.

the task id is AXoLCDQQG3vK4dcaLxpa

also if you can check AXoKXxLmnudF2A4OiRtz

Last analysis was with task AXoOeBpZqL1bNNYAaGDt (June 15th ~8am BST)

I can see that decoration failed for AXoKXxLmnudF2A4OiRtz, due to unauthorized, as before.

It looks like AXoOeBpZqL1bNNYAaGDt was successfully decorated.

Has your Azure DevOps token the code (read) and code (write) permissions?
Also, is it still active ? (not revoked or expired)