The GET /2.0/user/workspaces endpoint returns 200 OK but with empty values when using OAuth 2.0 Client Credentials grant type (grant_type=client_credentials).
The same endpoint works correctly with Authorization Code grant and Basic Auth — returns all workspaces as expected.
Setup:
- OAuth consumer is created at the workspace level (Workspace Settings → OAuth consumers)
- User is a workspace admin
- All scopes are enabled on the OAuth consumer
Background:We were previously using GET /2.0/workspaces with Client Credentials and it was returning all workspaces and repositories properly. After that endpoint was deprecated as part of the cross-workspace API sunset (April 14, 2026), we migrated to the recommended replacement GET /2.0/user/workspaces. However, this replacement does not work with Client Credentials grant type.
Questions:
- Is
GET /user/workspaces expected to work with Client Credentials? - If not, what is the recommended alternative for listing workspaces in server-to-server integrations where user interaction is not feasible?