[SOLVED] Azure DevOps + SonarCloud PR Integration Failing

##[error]ERROR: Error during SonarScanner execution

ERROR: Could not find the pullrequest with key '37019'

ERROR: Caused by: Error 404 on https://sonarcloud.io/api/alm_integration/show_pullrequest?project=xxx&pullrequestKey=37019 : {"errors":[{"msg":"Unable to find the pullrequest with key \u002737019\u0027"}]}

where xxx is indeed a valid project id in sonarcloud and the PR id is valid.
the PR does not show up in sonarcloud.

the builds succeed when running on master or any other branch.

please help.

Hey there.

Have you checked the token configured under your Organization-level Administration > Organization Settings in SonarCloud? Is it possible it’s expired?

thanks that was the issue. as a non admin I was not able to investigate such things.

ideally an expired token error should be logged instead of the not found?

I agree it’s a confusing error message, and it should be more obvious where the issue is. I’ll raise this point internally.