We use Sonar in combination with Azure DevOps.
Under Administration → Organization Settings → Organization Binding I set a PAT that is valids for for example half a year. Then randomly it can be 1 week, it can be 2 weeks the Run Code Analysis step in a pipeline will fail with an error like: ERROR Could not find the pullrequest with key ‘21579’
When going to the Organization Binding it says the binding failed. I have to set a new PAT while it’s still valid. Sometimes it doesn’t accept a regenerated token (AUTH: Failed authentication, the token used is likely not valid) and I have to create a new one in Azure DevOps with the same permissions and validity period as the one that failed.
Sometimes that also doesn’t work and we have to wait it out.
Update: The Sonarqube binding started failing on 8-9 and is still unavailable on 9-9.
This has been happening a lot the last quarter. Can this please be investigated?
We have seen this happen in the past when creating a token for an Azure DevOps account that was lacking Access Level: Basic or Contributor status. Could you check this?
An account with a Stakeholder or VS license Access Level could result in a token failure, as it does not have enough privileges.
Another thing that sometimes could explain the issue is if you have Conditional Access enabled. You might have to manually whitelist our SonarQube Cloud IPs in Entra, or try disabling the setting.
What happens if you try something like this with a “bad” token?