Skip to content

Manage API for group credentials inventory is not returning Service accounts' PATs

Currently, GET /groups/:id/manage/personal_access_tokens API endpoint(#510351 (closed)) returns enterprise users' PATs only.

https://gitlab.slack.com/archives/CLM1D8QR0/p1754474353684039?thread_ts=1754424685.473709&cid=CLM1D8QR0 (internal)

bdenkovych: GET /groups/:id/manage/personal_access_tokens API endpoint returns enterprise users' PATs only - it does not include the group service accounts' PATs. Following intentions/design of API endpoints under GET /groups/:id/manage/* path, it should return all PATs related to the top-level group.

bdenkovych: GET /groups/:id/manage/resource_access_tokens should not include service accounts' PATs, because - "Resource access tokens" are PATs that belong to users with project_bot type AKA Group access tokens|Project access tokens. On the Credentials inventory UI, the "Personal access tokens" tab shows both enterprise users' and service accounts' PATs. So, GET /groups/:id/manage/personal_access_tokens should include service accounts' tokens too.

Edited by Bogdan Denkovych