Authorization header prefix differs from OAuth 2.0 standard in REST Agent
search cancel

Authorization header prefix differs from OAuth 2.0 standard in REST Agent

book

Article ID: 423845

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

When using OAuth 2.0 authentication with the Integration REST Agent, jobs fail with an Unauthorized (401) error. The job report or network logs show the Authorization header using an non-standard prefix:

Authorization: OAuth ####

The target API expects the standard Bearer prefix:

Authorization: Bearer ####

Environment

Automic Workload Automation

Integration REST Agent 24.2.0 and earlier

RA WebService REST Agent (all versions)

Cause

A product defect (DE174378) causes the agent to append the "OAuth" prefix instead of "Bearer" by default in certain configurations, or fails to read the access token correctly as a bearer token.

Resolution

Fixed Version

This issue is resolved in Integration REST Agent version 24.2.1 and higher.

Fixed in release 24.2.1 and higher. 

Workaround

If an upgrade is not immediately possible, manually define the Authorization header in the REST job configuration:

  1. Open the REST Job object.
  2. Navigate to the Request or Header settings.
  3. Add a header named Authorization.
  4. Set the value to Bearer &TOKEN# (where &TOKEN# is a variable containing your access token).