Skip to Content

OAUTH Client Authentication Failed in SAP P0 7.5 SP15

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    Posted on Nov 05, 2019 at 11:54 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 04, 2019 at 04:46 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 05, 2019 at 08:49 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded