cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Rest Receiver Channel - HTTP 401 Unauthorized error

Bhargavakrishna
Active Contributor
0 Kudos
4,231

Dear All,

We are working on a REST to REST synchronous scenario. The target endpoint is working fine and we are able to test and post the data from postman, but when I'm testing the interface from SAP PO, the messages are getting failed with HTTP - 401 unauthorized error. We are on SAP PO 7.5 SP19.

Error Details

The messages are getting failed with the below error.

MP: exception caught with cause com.sap.aii.adapter.rest.ejb.common.exception.HttpCallException: HTTP POST call to https://test:443:xxx not successful. Unauthorized

Server returned code: 401

Please note that we are using basic authentication in both postman and the channel.

Actions performed so far.

1) Verified the credentials and end point.

2) Performed dummy changes in the channels and activated

3) Created new REST receiver channel

4) Enabled the trace in the target application, but the nothing got logged.

5) Performed cache refresh.

6) verified the content type and message headers.

7) verified the payloads from postman and from Po, both are same.

😎 Target application certificates were deployed already under trusted ca's with validity.

9) HTTP Destination ping test returned with HTTP status code 500 from NWA.

Please note that in the password, we are using "-", not sure, if is this causing any issue?

Request you to help me to fix this issue.

Thanks in advance.

Regards

Bhargava Krishna Talasila

View Entire Topic
manoj_khavatkopp
Active Contributor

Hi Bhargav ,

Add below module parameter , restart channel and try :

useAuthPreemptive = true

JayChan
Active Participant
0 Kudos

Hi, useAuthPreemptive = true Approach works for my case
Actually, instead of HTTP 401, my case return HTTP 500 where error msg said "HTTP POST call to https://xxxxxxxx not successful. Unauthorized"