ALM used: Azure DevOps
CI system used: Azure DevOps Pipelines
Error observed:
The user is authenticated via Azure DevOps, is a confirmed member of the organization, and can access projects via the SonarCloud UI without any issues.
However, when attempting to call the following API:
GET /api/projects/search?organization=ORG_KEY
they receive this error response:
No organization for key 'ORG_KEY'
Steps to reproduce:
- The user signs in through Azure DevOps and is a confirmed member of the organization.
- They can access and browse projects through the SonarCloud UI without any issues.
- A valid API token is used.
- When calling the endpoint
/api/projects/search?organization=ORG_KEY
, they receive the above error. - However, project-level API calls like:
GET /api/project_analyses/search?project=PROJECT_KEY
return data successfully, confirming that the user has access at the project level.
I’m trying to understand why the user can access projects via the UI and specific endpoints, but not via /api/projects/search
, even though they appear to have all the necessary permissions. Any insight would be appreciated — thanks!