on 2023 Oct 18 10:58 AM
Hi experts,
I have configured an action in BPA that calls a CAP service. This CAP service makes two PATCH calls to update some fields of the API_BUISNESS_PARTNER, one call updates fields of A_BusinessPartner and the other of A_Customer.
From the Test of the same Action it works fine:
From the test.http file of the CAP project as well:
From Postman it works fine as long as the authentication is OAuth 2.0.
If I run the BPA process but, it fails with the following message:
Action '13832448-28a1-4ccf-b496-097e0696b794' failed with the following error: 'Error thrown from action runtime library: Failed to execute action Set Client Status: Failed to build headers. The destination tried to provide authorization tokens but failed in all cases. This is most likely due to misconfiguration. Original error messages: Retrieval of OAuthToken failed due to: unexpected error'.
I think it is a problem with the CSRF of the action, which must be configured correctly and I don't know how:
Screenshot of the destination:
I have followed the following tutorial: CAP simple nodejs service In this case, the tutorial indicates that you have to create a destination with authentication type NoAuthentication, but the result is the same, I have already tested it. For the CSRF configuration I have followed these documents: SAP Build Pprocess Automation - csrf-token SAP Build
and Process Automation - Using x-csrf-token in actions
When configuring the Action in this way, the error I get in the process is as follows: Action ID: post_setStatus Destination: BPA_To_CAP Error message: Action 'b92aeacd-eeb0-47bd-9f62' failed with the following error: 'Error thrown from action runtime library: Failed to execute action Set Client Status: Failed to build headers. The destination tried to provide authorization tokens but failed in all cases. This is most likely due to misconfiguration. Original error messages: Retrieval of OAuthToken failed due to: Unable to fetch refresh token from the specified token service URL. Response was: Token header claim [kid] references unknown signing key : [default-jwt-key--1272797071]'. I have also tried this:
Configuring x-csrf using actions editor
Any help would be welcome.
Thanks and Best Regards,
Dídac.
PD: I've opend a note to SAP but without much success...
We added the following property to the destination and this works:
- sap.build.usage: CAP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
10 | |
10 | |
10 | |
10 | |
9 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.