Add audit-only token scope without org:write
Author: sentry-junior[bot]Created Jul 27, 2026Updated Sep 17, 2026
LabelsWaiting for: Product OwnerFeatureAuth
SIEM and compliance integrations that only need management-plane audit logs currently require org:write because OrganizationAuditPermission gates GET /api/0/organizations/{org_slug}/audit-logs/ on that scope. That forces over-privileged tokens for a read-only use case.
Current behavior
- Audit log API access is enforced by
OrganizationAuditPermission, which mapsGETtoorg:write(plus active superuser). - The endpoint itself already exists on
OrganizationAuditLogsEndpoint. - Related: public documentation/promotion of the endpoint is tracked in https://github.com/getsentry/sentry/issues/115757.
Gap
Customers pulling audit logs into a SIEM cannot mint a least-privilege token limited to audit-log read access. Any token that can call the endpoint also carries broader org write capability.
Requested capability
- Add a purpose-built audit-only scope (or equivalent token permission) that can read org audit logs.
- Ensure that scope does not grant
org:writeor other write/admin org capabilities. - Allow auth tokens / org tokens using only that scope to call the audit-logs endpoint.
Requested by Gene Wright via Junior.
--
Source: getsentry/sentry