cancel
Showing results for 
Search instead for 
Did you mean: 

OAUTH Client Authentication Failed in SAP P0 7.5 SP15

former_member607993
Contributor
0 Kudos

Hello Experts,

I'm facing the below error in REST Receiver channel (via OAUTH 2.0 Grant type).

Catching exception calling messaging system: com.sap.aii.adapter.rest.ejb.common.exception.HttpCallException: HTTP OAUTH 2.0 CLIENT CREDENTIALS GRANT call to https://url.com:443/api/authentication/access_token not successful.

Error while obtaining access token - response code: 400 response:

{

"error_description":"Client authentication failed",
"error":"invalid_request"
}:

Thanks and Regards,

Rajesh PS

Accepted Solutions (1)

Accepted Solutions (1)

former_member607993
Contributor

Hello Mates,

Actually the issue was with the request URL. It was not able to query the Authorization URL to retrieve the access tokens.

Henceforth after adding a new module parameter "Oauth20AutorizationServerRequestType" in REST Receiver channel and Setting its value to 'query' then it works successfully( Easy reference: SAP Note 2639934).

This new module parameter allows to specify how the access token is requested from the partner authorization server. The default value is 'header'.

Note: This interface is for OAUTH 2.0 Client Credentials Grant type.

Thanks and Regards,

Rajesh PS

Answers (2)

Answers (2)

ravicarpenter
Active Participant
0 Kudos

If you are receiving the above json response then it means that server is reachable and authentication is failing. Check the request specifications. Try using rest client tools.

sugata_bagchi2
Active Contributor
0 Kudos

Hi Rajesh,
if you are calling to port 443, did you make sure if you have the required certs installed in PI, if any?

Thanks

Sugata