We’re building a unified API gateway for our BPO clients. Each client sits in their own CXone division. The goal is to have a single OAuth client credential set that can be scoped dynamically based on the incoming request header, rather than maintaining separate clients per tenant.
Tried setting the X-Genesys-Organization-Name header during the token request, but the resulting access token still carries the global scope. When I hit /api/v2/users, it returns users from all divisions instead of just the target one.
Here’s the token exchange payload:
{
"grant_type": "client_credentials",
"client_id": "our-shared-client-id",
"client_secret": "secret",
"scope": "user:read"
}
The docs mention division-scoped tokens, but the examples are vague on how to enforce that at the auth layer. Is there a specific claim or scope parameter I’m missing? Or do I have to fall back to impersonation with a user token for each division?
Feeling stuck on the token generation step. The API calls work fine once I have a user token, but getting there efficiently is the bottleneck.