# SonarCloud not populating “SonarCloud/quality gate” Status Check policy in AzureDevOps

**URL:** <https://community.sonarsource.com/t/sonarcloud-not-populating-sonarcloud-quality-gate-status-check-policy-in-azuredevops/116522>\
**Category:** SonarQube Cloud\
**Created:** [June 3, 2024, 10:16am UTC](https://community.sonarsource.com/t/sonarcloud-not-populating-sonarcloud-quality-gate-status-check-policy-in-azuredevops/116522 "2024-06-03T10:16:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pranay\_Mann](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/pranay_mann/32/46051_2.png) [@Pranay\_Mann](https://community.sonarsource.com/u/Pranay_Mann)\
**Post date:** [June 3, 2024, 10:16am UTC](https://community.sonarsource.com/t/sonarcloud-not-populating-sonarcloud-quality-gate-status-check-policy-in-azuredevops/116522/1 "2024-06-03T10:16:16Z")

</div>

We are using sonarcloud with azuredevops and we are able to see all the branches and PR’s populate on sonar after connecting them through the PAT having the required permissions.

But once we apply sonarcloud status check on a target branch’s branch policy, we do not see the status check getting any info from sonarcloud and stays in the waiting state

We followed the solution in doc

> [@SonarCloud not populating "SonarCloud/quality gate" Status Check policy in AzureDevOps](https://community.sonarsource.com/t/sonarcloud-not-populating-sonarcloud-quality-gate-status-check-policy-in-azuredevops/69731):
>
> Hi Team, We have recently purchased the SonarCloud licence. We are buidling our dotnet core application in multi stage dockerfile. As part of the build stage, we have added dotnet sonar scanner step for performing sonarcloud scanning for the pull request. dotnet sonarscanner begin \ /k:"$SONAR\_PROJECT\_KEY" \ /n:"$SONAR\_PROJECT\_NAME" \ /o:"$SONAR\_ORGANIZATION\_KEY" \ /d:sonar.host.url="$SONAR\_HOST\_URL" \ /d:sonar.login="$SONAR\_TOKEN" \ /d:sonar.coverageR…

But it also did not work , please suggest a possible solution for the above issue

Extra details

- ALM used → Azure DevOps

- CI system used → Azure DevOps

- Scanner command used when applicable (private details masked)

- Languages of the repository - node.js

- Only if the SonarCloud project is public

- pull request - [Azure DevOps Services | Sign In](https://zinfitech.visualstudio.com/UCMGen3/_git/UCMUI/pullrequest/4141)

\*Error observed

1. Sonarcloud status check in waiting state

2. Could not find ref ‘develop’ in refs/heads, refs/remotes/upstream or refs/remotes/origin. You may see unexpected issues and changes. Please make sure to fetch this ref before pull request analysis.

3. Shallow clone detected during the analysis. Some files will miss SCM information. This will affect features like auto-assignment of issues. Please configure your build to disable shallow clone.

_Steps to reproduce_

Apply sonarcloud status check on target branch’s policy

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [June 4, 2024, 9:54am UTC](https://community.sonarsource.com/t/sonarcloud-not-populating-sonarcloud-quality-gate-status-check-policy-in-azuredevops/116522/2 "2024-06-04T09:54:12Z")

</div>

Hey there.

> [@Pranay\_Mann](#):
>
> extraProperties: |  
> sonar.pullrequest.provider=“vsts”  
> sonar.pullrequest.vsts.instanceUrl=“[Azure DevOps Services | Sign In](https://dev.azure.com/zinfitech/%E2%80%9D)  
> sonar.pullrequest.vsts.project=“name\_changed\_project”  
> sonar.pullrequest.vsts.repository=“\*\*\*UI”

The first thing I would suggest is getting rid of all of this. You should not need these for PR decoration, and likely they will be set incorrectly and mess things up.

> [@Pranay\_Mann](#):
>
> 1. Could not find ref ‘develop’ in refs/heads, refs/remotes/upstream or refs/remotes/origin. You may see unexpected issues and changes. Please make sure to fetch this ref before pull request analysis.
> 2. Shallow clone detected during the analysis. Some files will miss SCM information. This will affect features like auto-assignment of issues. Please configure your build to disable shallow clone.

These are also important issues to fix. You should make sure that the clone depth is set to 0 (so that a shallow clone will not be performed).
