cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Builds Apps using BTP Destination - 500 Internal server error: Unable to fulfill proxy request

Vendel_Seedorff
Explorer
0 Kudos
3,005

Hi Community!

So I have just recently started my journey to expand my skills on BTP and SAP Build Apps. For this I have setup the 90-day free Trial BTP environment as I will only use it for my own personal development and try out some simple scenarios in non-prod and non commercial aspects. Including simple integration flows using the trial Integration Suite.

I have been successful in making my very own first mobile app using the SAP journey. Very satisfying since I come from a technical background and never developed applications!

My goal is to then use my new skills in any potential customer engagements and assignments in their environments.

So to my current small project and issue:

Goal - Simple SAP Successfactors app, to be able to use SAP standard API's and create simple web forms/mobile app on SAP Build.

For this I have access to a Demo/Trial Successfactors system as a SAP partner.

So I have my BTP trial global account with the subaccount and have done the following:

- Enabled the SAP Build Apps

- This also includes the Cloud Identity Services, Business Application Studio and Build Work Zone

- Enabled the Integration Suite with Trial plan

- Made sure the necessary entitlements for Successfactors Extensibility are in place (api-access and sso-configuration)

- The instances for SAP Successfactors Extensibility are created and also the ones for integration flow

- Successfully established and registred the BTP trial global account with the Successfactors demo system

- HTTP destination is in place and working including the necessary additional properties

- New project in SAP Build Apps

The HTTP Destination was created using the OAuth2SAMLBearerAssertion and connection check is OK.

However I am getting Failed to load in the Add Integration/BTP destinations:

When clicking it shows this

Destination details
{
  "name": "Successfactors_Trial",
  "productName": "SAP SuccessFactors",
  "mobile_enabled": false,
  "requires_csrf": true,
  "sapSalesAndServiceCloud": {
    "is_mashup": false,
    "is_api_metadata": false,
    "is_api": false
  },
  "is_catalog": false,
  "is_appgyver_metering": false,
  "is_dynamic": true
}
Request details
{
  "headers": {
    "Accept": "application/json, text/plain, */*",
    "Content-Type": "application/json",
    "x-csrf-token": "81f911f27d7ede76c3c60324bd186f678e5b8833d37559d2400c9c8ab0347b73",
    "x-requested-with": "XMLHttpRequest"
  },
  "baseURL": "/destinations_api/v2/destination/Successfactors_Trial",
  "data": "{\"headers\":{\"accept\":\"application/json, text/plain, */*\"},\"url\":\"\",\"method\":\"get\"}",
  "adapter": [
    "xhr",
    "http"
  ]
}
Response details
{
  "status": 500,
  "headers": {
    "content-length": "80",
    "content-type": "application/json; charset=utf-8",
    "date": "Fri, 22 Dec 2023 11:07:30 GMT",
    "etag": "W/\"50-sa5SlLWsYaGxfJDCkJJp6FVHVoQ\"",
    "strict-transport-security": "max-age=63072000; includeSubDomains; preload",
    "x-correlation-id": "46a05d26-472a-4af1-bb5a-a26057a985db",
    "x-frame-options": "DENY",
    "x-request-id": "46a05d26-472a-4af1-bb5a-a26057a985db"
  },
  "data": {
    "error": "Failed to build headers.",
    "message": "Unable to fulfill proxy request"
  }
}

Instance details

Accepted Solutions (0)

Answers (7)

Answers (7)

NaotoSakai
Product and Topic Expert
Product and Topic Expert
0 Kudos

This would probably work well if it were registered and called in the SAP Work zone (standard or advance)
like this https://developers.sap.com/tutorials/workzone-build-6-sales-app.html

inesmartins
Participant
0 Kudos

Hello,

I'm facing similar issue.
Did you find any solution?

Thanks,
Ines Martins

Dan_Wroblewski
Developer Advocate
Developer Advocate
0 Kudos

Please note that when you create a destination for SAP Build Apps, the URL must point directly to a specific OData service, not to the general system and not to a specific entity. If its not to an OData service, it will return an error and not show data (though I don't remember what error).

This is why I wanted to see what that URL returned from the backend when testing from a different development environment or Postman.

If it's an authentication error, it would likely give you 401 or 403 error.

Vendel_Seedorff
Explorer
0 Kudos

Hi Pekka,

Thanks for your suggestion. 🙂

There have not been any keys or destination services configured in my original scenario since the only thing I tried was to directly go into SAP Build Apps and from there try to establish a OData connection/BTP Destination after I had registred the Successfactors system in BTP and the Destination was automatically created when using the "Successfactors Extensibility" from the service marketplace.

I now realize that I probably starting of with something slightly to difficult scenario since Im all new to both BTP and Build Apps. Ive simply try to follow some of the blogs here on this community but seem the scenario is little bit different. After trying to follow another developers learning journey by daniel.wroblewski - "https://developers.sap.com/tutorials/build-apps-cap-service.html" I realize one of my issues is most likely related to the authentication flows and something with the the connectivity in between SAP Build Apps <-> SAP BTP Destinations <-> Authentication Services ..or anything in between. Because even if that specific tutorial is rather using BAS instead and then the application is deployed into BTP I can clearly see that a lot of more things are created as part of that deployment, for example destination services, various keys etc.

Not sure how to make a successful test but if anyone in this community have ideas or could guide me it would be much appreciated.

agpekka
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Even it might sound obvious, I would still triple check the credential/api-keys whatever there is shown with dots in destination definition, that they do match to the correct ones.
Many times they will end up having additional whitespace when copy-pasted.

And the error failed to build headers comes usually, when cloud-sdk is unable to fetch some auth tokens.

-Pekka

Vendel_Seedorff
Explorer
0 Kudos

1. Not sure how or wherelse I could use the destination? In short I have setup this BTP 90-day free Trial account using the method described by SAP. I could only pick 2 hosting/tenant locations so I picked the one in US and its then automatically being setup on AWS. Once the process was completed I could login to my BTP trial account and then I used the available boosters to also enable SAP Build+SAP work zone and I also enabled SAP Integration Suite (free edition). So In my mind this is all running on the same hosting and within the same tenant.

2. As everything I have setup are within the same BTP trial tenant I'm not sure why its not working. Especially since the destination check is successful using the OAuth2SAMLBearerAssertion authentication method.

As mentioned earlier I have successfully (I think) created the trust relationship in between this BTP trial account and the Successfactors demo system. I have created the trust and uploaded the samlmetadata file that was generated from that Successfactors system. The BTP destination was automatically created when I used the "SAP Successfactors Extensibility" from the Service Marketplace and simply followed that guided wizard.

Vendel_Seedorff
Explorer
0 Kudos

daniel.wroblewski any help here would be really appreciated. It looks fairly straight forward when reading the various blogs or the learning journey's but it doesnt work still 😞

Dan_Wroblewski
Developer Advocate
Developer Advocate
0 Kudos

2 things I can suggest/ask:

  • Can you show the response when using the destination somewhere else (successfully)?
  • When I created a CAP service and used it in Build Apps, I had to have them on the same tenant, or there was an authentication issue (using UserTokenExchange), and maybe there is also a restriction here.
mep
Explorer
0 Kudos
I'm struggling with this too. Wonder if you managed to resolve this. Any help will be appriciated 🐵
tsapkov
Discoverer
0 Kudos

Hi mep,

I solve the issue by changing the authentication method for the SF destination in BTP cockpit from OAuth2SAMLBearerAssertion to the BasicAuthentication. Now it works and I need to figure out how to customize the oauth2 method properly but that's another story.