We’re building a custom embeddable client app for a multi-tenant BPO setup. Each tenant has its own division in Genesys Cloud, and we need the OAuth client to only access resources within the specific tenant’s division. The goal is to prevent cross-tenant data leakage.
I’ve created an OAuth client via the /api/v2/oauth/clients endpoint and set the divisions parameter in the request body like this:
{
"name": "BPO Tenant 1 Client",
"divisions": [
{
"id": "division-id-1",
"name": "Tenant 1 Division"
}
]
}
The client is created successfully, but when I try to fetch resources using the access token, I get a 403 Forbidden error for resources outside the specified division, which is expected. However, I’m also getting 403 errors for resources within the division, which shouldn’t happen.
I’ve verified that the access token is valid and has the correct scopes. I’ve also checked that the resources exist and are assigned to the correct division.
Has anyone else run into this issue? Is there something I’m missing in the OAuth client configuration or the way I’m making the API calls?
Here’s the API call I’m making:
GET /api/v2/users?divisionId=division-id-1
The response is:
{
"errors": [
{
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action."
}
]
}
Any insights would be appreciated.