Hey @andres ,
Thanks for the guidence,
I followed you instructions from above.
I am observing different behavior between two SonarQube Community Build instances when querying the API using a Global Analysis Token (sqa_...):
Environment Details:
- Server A: SonarQube Community Build v25.5.0.107428 (MQR Mode)
- Server B: SonarQube Community Build v25.2.0.102705 (MQR Mode)
Configuration (Identical on both servers):
- Both instances have a Global Analysis Token (
sqa_...) generated under theadminuser account. - The
adminuser hasAdminister System. - The projects on both servers are set to
Private. - Both servers use this tokens in a CI/CD pipeline for:
-
Running
sonar-scanneranalysis (works on both) -
Fetching project metrics via REST API after Quality Gate evaluation:
GET /api/measures/component?component=<PROJECT_KEY>&metricKeys=alert_status,bugs,vulnerabilities,code_smells,coverage
-
Problem / Behavior:
-
On Server A (v25.5.0): The API call with the Global Analysis Token returns
HTTP 200 OKwith all requested measures as expected. -
On Server B (v25.2.0): The exact same API call with the Global Analysis Token fails with
HTTP 403 Forbidden:{
“errors”: [
{“msg”: “Insufficient privileges”
}]
}
Questions:
- Was there an intentional change in permission scoping for Global Analysis Tokens between v25.2 and v25.5 that allows them to query
/api/measures/componenton private projects in newer builds? - For v25.2, is there a specific permission setting required to allow a Global Analysis Token to read measures, or is a User Token (
squ_...) strictly required in that version?
Please let me known how can i troubleshoot this problem
Thank you