SonarCloud - Azure - Pull Request 404

Hi,

i currently have an issue with pull requests at one of my projects. While pull request analysis succeed for my other project, for this one it fails.

  • ALM: Azure DevOps
  • CI system: Azure DevOps
  • Languages of the repository: JS

During the analysis the following API call:

https://sonarcloud.io/api/alm_integration/show_pullrequest?project=***&pullrequestKey=2708

(i have removed the project name)
fails, leading to a 404 error with the following message:
{“errors”:[{“msg”:“Requested resource wasn’t found on Azure DevOps.”,“reason”:“AZURE_DEVOPS_UNABLE_TO_FETCH_REQUESTED_RESOURCE”}]}

The pull request key is the correct one. Using the Azure API itself also succeeds.
https://dev.azure.com/***/***/_apis/git/repositories/***/pullrequests/2708

I have already checked the global access token and made sure there is no project specific access token.
Additionally, normal analyses for pipelines do succeed. Only the ones triggered by a pull requests have this issue.

I would be glad to get any kinds of hints how this issue might get fixed.

best regards,
Sebastian

Hi Sebastian,

Welcome to the community!

To be clear, you’ve checked that the token you’re using for analysis has access to the project? Have you double-checked that the Azure PAT you’re provided has full access to the project in Azure?

 
Ann

Hi,

the user from which I have provided the PAT has the same access for two projects.
For one project everything works as expected. For the other project only pull requests analysis fail.
“Normal” pipelines analysis work for both projects.

best regards,
Sebastian

1 Like

Hi,

Thanks for the clarification. I’m out of my depth & I’ve referred this internally.

 
Ann

I did manage to resolve the issue by deleting the project on sonarcloud and recreating it.

best regards,
Sebastian

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