WFM API 401 Unauthorized when fetching shift requests via ServiceNow Scheduled Import Set

No idea why this is happening, the ServiceNow import set tries to pull shift request data from the Genesys Cloud WFM endpoint GET /api/v2/wfm/scheduling/shift-requests. The OAuth token refresh logic appears correct, yet the response consistently returns 401 Unauthorized.

The integration uses a standard client credentials flow with the correct scope for wfm:schedule:read. Direct calls from Postman work fine, but the scheduled job in ServiceNow fails immediately upon token expiry. The error payload indicates an invalid scope or client mismatch, but the configuration matches the working Postman request exactly.

{
“grant_type”: “client_credentials”,
“scope”: “wfm:schedule:read wfm:shift-requests:read”
}

Missing `wfm:shift-requests:read` in the token scope. Postman likely uses a legacy or broader scope token.

Yep, this is a known issue with ServiceNow’s OAuth handling during token rollover. Ensure the scope string includes wfm:shift-requests:read explicitly, as the generic wfm:schedule:read often lacks the granular permissions needed for shift request endpoints.