WFM Schedule Data Action 401 Unauthorized when pushing to ServiceNow via Webhook

Stuck on a persistent 401 Unauthorized error when attempting to sync Genesys Cloud Workforce Engagement schedule data to ServiceNow using a Webhook Data Action. The goal is to update the wf_schedule table in ServiceNow with real-time agent availability shifts generated by the WFM module. The integration worked flawlessly for three weeks using the standard OAuth 2.0 client credentials flow, but suddenly broke yesterday without any changes to the Architect flow or the ServiceNow instance configuration.

The Architect flow is triggered by the wfm:agent:schedule:updated event. The flow extracts the agent_id, start_time, and end_time from the event payload and passes them to a Data Action configured as a POST request to the ServiceNow REST endpoint /api/now/table/wf_schedule. The request headers include Content-Type: application/json and an Authorization: Bearer <token> header. The token is fetched dynamically using a separate Data Action that calls the ServiceNow OAuth token endpoint with the correct client ID and secret stored in Genesys Cloud secrets.

Debugging the flow execution logs reveals that the token retrieval step succeeds, returning a valid JWT with the expected scope (data:write). However, when the subsequent Data Action attempts to use this token to post the schedule update, ServiceNow rejects it with a 401 status code. The error response body from ServiceNow is minimal: {"error":{"message":"Invalid credentials","detail":"User not found"}}. This suggests the token itself might be malformed or the client ID associated with the token is not recognized by the target table’s ACLs.

I have verified that the ServiceNow user account linked to the OAuth client has the necessary roles (wf_admin, wf_agent) and that the client ID matches the one configured in Genesys Cloud. I have also tried regenerating the client secret and updating the Genesys Cloud secret, but the issue persists. The same OAuth client works perfectly when tested via Postman, ruling out issues with the ServiceNow configuration.

Has anyone encountered a similar issue where a valid OAuth token is rejected by ServiceNow specifically for WFM-related tables? Is there a known limitation or a specific header requirement for WFM data actions that I might be missing? The environment is Genesys Cloud v2024.1 and ServiceNow Washington DC Patch 5.