401 Unauthorized Error in iFlow SAP Jobs in WA Agent
search cancel

401 Unauthorized Error in iFlow SAP Jobs in WA Agent

book

Article ID: 438048

calendar_today

Updated On:

Products

Workload Automation Agent

Issue/Introduction

When running an iFlow SAP job (POJO type), the job fails with a 401 - Unauthorized error. Reviewing the job log with LogLevel=16 reveals the following symptoms:

  • The Client ID or Management Client ID appears to be corrupted, with ;RC=0 appended to the end of the string.
    2026-01-21T16:15:00.454-04:00: Client ID: ##########-example-dev!1234
    2026-01-21T16:15:00.454-04:00: Management Client ID: ############;RC=0...
    2026-01-21T16:15:00.880-04:00: Authentication Failure while triggering iFlow: Failed to generate headersCaused by: com.ca.http.HttpClientExceptionHC5: Request failed: 401 - Unauthorized

Environment

Workload Automation Agent: 12.1 or above

Plugin Extension: SAP Integration Suite (POJO Job)

 

Cause

The client ID sent to the SAP authentication endpoint is incorrect, the server rejects the request with a 401 Unauthorized status.

Resolution

  1. Ensure the values exactly match the credentials provided in the SAP BTP service key.

  2. Update the stored values for the affected ClientId and ManagementClientId to remove any trailing characters.