Skip to Content
avatar image
Former Member

SAP HANA trial receiving 502 server error authenticating to Success Factors API


I am a trial user developing a demo iOS app using SAP Cloud Platform SDK for iOS Assistant. Searching SAP API Business Hub for SF API, I was able to create several mobile native apps using connections/destinations to various SF API endpoints. Using the iOS Assistant specifying existing connections mostly work but I'm running into a reproducible 502 error after supplying onboarding credentials for one particular API. I let the assistant generate a master/detail app using the following connection:

Success Factors User Management (User, UserPermissions)

The app is not using authentication only specifying APIKey in request header. I have successfully tested this API in Discovery API tools in browser as well as Postman and Curl so I know it works. The iOS Assistant is able to generate an Xcode project using a destination with the above URL. App compiles and executed on iOS Simulator while displaying the on-boarding and authentication screens. After entering correct credentials, the response returns with a 502 error stating authentication failed and to check authentication URL and authenticator used. To note, the destination/connector configuration is identical to others I have configured for additional endpoints and it is not clear in the logs why this one fails. Here is a screenshot of the error on iOS simulator.

Any help is appreciated.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Mar 09, 2018 at 03:54 PM

    Brian,I tried reproducing this with the Assistant and creating a new app with an SAP API Business Hub endpoint. I'm not seeing exactly the same thing, but also a failed onboarding flow because apparently the backend doesn't respond with a service catalog at the root URL. The problem is that the onboarding flow tries to connect to a backend URL to validate that the authentication was actually successful, and default to the service root - as you can see in your error message. What helped in my case was that I configured the OnboardingManager.swift in the generated app to use a different URL to validate the authentication

    let discoveryConfigurationTransformer = DiscoveryServiceConfigurationTransformer(applicationID: "", authenticationPath: "")

    try change this to

    let discoveryConfigurationTransformer = DiscoveryServiceConfigurationTransformer(applicationID: "", authenticationPath: "$metadata")

    at least for me that did the trick



    Add comment
    10|10000 characters needed characters exceeded