SonarCloud Pull Request Run not working

Hello @hitika26

Thanks for the additional information.

I am not the one who created the PAT for SonarCloud, and I am not having the PAT that was used here. But I asked the user who created and added that, he had again updated the PAT but the problem still persists.

Did you try the recommendation on the documentation about how to setup the connection with the required permissions and configuration in Azure DevOps for SonarCloud? In particular, the sections Location of Personal Access Tokens in SonarCloud and Use a technical user ?

Additionally, could you please make sure the Azure DevOps user creating the PAT is a basic user? I found this thread in our community about issues with the user type.

Unfortunately, our internal logs show that the pull request can’t be found and it leads to the PAT being incorrect.

Could you please send me screenshots of the following?

  1. In Azure DevOps, when creating (or editing) a new token, show that it has scope custom define and the code has read & write selected
  2. In Azure DevOps, under Organization settings, ensure that Azure Active Directory Conditional Access Policy Validation is disabled if needed.
  3. In Azure DevOps, under Organization settings, ensure the user creating the PAT has Basic access level
  4. In your terminal, show that the curl command with --verbose flag suggested here is working as expected
  5. In SonarCloud, under the Organization Administration section and Azure DevOps connectivity management, show the status of the current token. If it’s invalid, you will see this:

I will need all this information to proceed with the investigation so please make sure to send them all and let me know if you have any questions.