SonarCloud Status Check and Decoration not working on Azure DevOps Pull Requests

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)
  • task: SonarCloudPrepare@1
    SonarCloud: ‘xxx’
    organization: ‘xxx’
    scannerMode: ‘MSBuild’
    projectKey: ‘xxx’
    projectName: ‘xxx’
  • Languages of the repository
  • Only if the SonarCloud project is public, the URL
  • Error observed (wrap logs/code around with triple quotes ``` for proper formatting)
    No errors
  • Steps to reproduce
    PR’s Validation Build completed. The build summary shows the Quality Gate failed (under extension tab). I expected to see the Quality Gate status check to appear in the PR but nothing was there. Also no decoration comments were added to the PR. SonarCloud project has been configured with ADO pat token. Background task doesn’t show any warning or error.
  • Potential workaround

Hi @shin-akuma and welcome

Can you give us the background task id instead please ? That will help use finding it in our internal logs.


1 Like

Thanks @mickaelcaro!

Here you go: AXPdj_ALm3K0Dysh0nvW & AXPdV4vzm3K0Dysh0nYZ

Thank you !

Which kind of permissions did you give to your PAT ?

Code Read and Write. Cheers

I tested the PAT directly with ADO’s Rest API, and I’m able to create Statuses on Pull request fine. Cheers

It is the AAD Conditional Access Policy blocking SonarCloud. Please close the ticket. Thanks.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.