Showing results for 
Search instead for 
Did you mean: 

SAP CAP JAVA accessing business rules destination is giving bad credentials error

0 Kudos

Hi Experts,

I am trying to access Business rule destination defined in BTP through DestinationAccessor but it is giving below error,

"Failed to read authentication token of destination 'BUSINESS_RULES_BPA'. The destination service responded with an error: 'Bad credentials'.


This is my code to access the destination,


Screenshot 2024-02-01 at 11.00.56 am.png

The same client secret and password is working fine in Postman.

Thanks in advance.


0 Kudos
Hello sk_ramkumar , Could you figure out what was the root cause for this to happen , I am facing the same issue via Java APP

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

I'm a developer from the SAP Cloud SDK team.

The error message "The destination service responded with an error: 'Bad credentials'" indicates that the BTP Destination Service was unable to resolve an access token with the OAuth2 Client Credentials grant. That means the request you ran with Postman does not work for the service respectively.

SAP Cloud SDK is not performing the token exchange/retrieval operation. Instead it fully relies on BTP Destination Service. However the SDK caches the service response for a few minutes.

Does the problem persist? If yes, then I would rather recommend approaching the BTP Destination Service colleagues.

Answers (0)