HTTP POST Error: "HTTP code: 401. Reason: Unauthorized" When Connecting to JIRA from Process Automation Manager (PAM)
search cancel

HTTP POST Error: "HTTP code: 401. Reason: Unauthorized" When Connecting to JIRA from Process Automation Manager (PAM)

book

Article ID: 210034

calendar_today

Updated On:

Products

CA Service Management - Service Desk Manager CA Process Automation Base

Issue/Introduction

Error when connecting through REST from PAM to JIRA using Basic Authentication: "HTTP code: 401. Reason: Unauthorized"

[com.optinuity.c2o.servicegroup.netutils.HttpGenericOperationsWrapper] [be-3c71236f6138] HTTP response content was saved to the dataset, content: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><status><status-code>401</status-code><message>Client must be authenticated to access this resource.</message></status>
[com.optinuity.c2o.servicegroup.netutils.HttpGenericOperationsWrapper] [be-3c71236f6138] HTTP response status line: HTTP/1.1 401 Unauthorized
[com.optinuity.c2o.servicegroup.netutils.HttpGenericOperationsWrapper] [be-3c71236f6138] HTTP response returned a non-success HTTP code: 401. Reason: Unauthorized
[com.optinuity.c2o.servicegroup.netutils.HttpGenericOperationsWrapper] [be-3c71236f6138] Error while executing request or processing HTTP response.
com.optinuity.c2o.util.C2OException: HTTP response returned a non-success HTTP code: 401. Reason: Unauthorized
 at com.optinuity.c2o.servicegroup.netutils.HttpGenericOperationsWrapper.callRequest(HttpGenericOperationsWrapper.java:697)
 at com.optinuity.c2o.servicegroup.netutils.PostURLOperationRunner.postURLSvcOp(PostURLOperationRunner.java:134)
 at com.optinuity.c2o.servicegroup.netutils.PostURLOperationRunner.run(PostURLOperationRunner.java:66)
 at java.lang.Thread.run(Thread.java:748)
 [com.optinuity.c2o.servicegroup.netutils.HttpGenericOperationsWrapper] [be-3c71236f6138] Shut down the HTTP client connection manager.
[com.optinuity.c2o.servicegroup.netutils.PostURLOperationRunner] [be-3c71236f6138] Failed to run HTTPPostURLOperation
com.optinuity.c2o.util.C2OException: Error while executing request or processing HTTP response. class com.optinuity.c2o.util.C2OException. HTTP response returned a non-success HTTP code: 401. Reason: Unauthorized
 at com.optinuity.c2o.servicegroup.netutils.HttpGenericOperationsWrapper.callRequest(HttpGenericOperationsWrapper.java:720)
 at com.optinuity.c2o.servicegroup.netutils.PostURLOperationRunner.postURLSvcOp(PostURLOperationRunner.java:134)
 at com.optinuity.c2o.servicegroup.netutils.PostURLOperationRunner.run(PostURLOperationRunner.java:66)
 at java.lang.Thread.run(Thread.java:748)

Environment

Release : 4.3  and higher

Component : Process Automation

Cause

Basic authentication deprecated in JIRA

https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-basic-auth-and-cookie-based-auth/#:~:text=The%20deprecation%20period%20for%20this,%2C%20OAuth%2C%20or%20Atlassian%20Connect.

Resolution

Add the "Authorization" key in the HTTP Headers Information and set the value in base64 format