Make Sonar Quality Checks as "Required" & fail pipeline if Quality gate fails in Azure DevOps

The SonarCloud check should be enforced on pull requests so that code cannot be merged when SonarCloud did not succeed. It seems to be configured like this but in our pull requests it is not enforced.

We have 8 pipelines in Azure Devops, which are executed on branch.
Branch policies also set in Azure Devops (Repository settings).Build Validations and Status Checks.

These status checks are enabled on branch policies but they are prompted as optional on the PR.
We want to make Sonar Quality check as a Required check and fail pipeline if Sonar Quality is failed.

Sounds like you just need to edit your build policy.

image

They are already in required state.

In that case, you probably want to get in touch with Azure DevOps support, if the checks you set are still being shown as optional.

This is how it is showing sonar quality gate as optional, we require it to be made required.

image

We have the same problem. Did you solved it?

Best regards