PATCH /api/v2/users fails with 422 Unprocessable Entity during Zendesk agent profile sync

What is the reason this setting causes the PATCH /api/v2/users endpoint to return a 422 Unprocessable Entity error when updating user roles during our Zendesk to Genesys Cloud migration? We are attempting to replicate the simple role assignment logic from Zendesk Support, where tags defined access levels. In Genesys Cloud, we are mapping those tags to specific user roles via the Platform API.

The request payload includes valid organization_id and user_id fields. The roles array contains a single object with a type of user and a role_id that exists in our EU-2 environment. Despite verifying the role ID against the GET /api/v2/roles response, the update fails consistently. The error message returns: {"errors":["Role assignment invalid for user type"],"status":422,"code":"bad.request"}. This blocks our automated agent onboarding script.

In Zendesk, assigning a tag like ‘tier2_support’ was instant and stateless. Genesys Cloud seems to enforce stricter consistency checks or async propagation delays. We are using the Genesys Cloud Node.js SDK version 3.0.10. The user account exists, is active, and has no other conflicting permissions. We have tried adding a retry mechanism with exponential backoff, but the 422 error persists immediately on every attempt.

Our migration strategy relies on syncing these roles in real-time to ensure agents have immediate access to queues upon login. Any delay breaks the workflow. We are in the Europe/Paris timezone, which might affect some cache invalidation logic, though API docs suggest immediate consistency for role assignments. Has anyone successfully mapped Zendesk tags to GC roles via API without hitting this wall? We need a reliable way to update these roles without manual admin intervention.