-
Notifications
You must be signed in to change notification settings - Fork 17
How to establish connection to SAP DataSphere OData API? #779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey @MikeSchernbeck, You seem to be accessing the destination correctly. May I ask you to double-check your destination configuration, especially the fields related to authentication? The error message clearly indicates something is wrong with the grant type. If you’d like, feel free to provide us with a screenshot of your destination configuration so we can take a look. Just remember to blur or obscure any sensitive information, as this is a public repo. Best regards, |
Thanks for the prompt response. Here the configuration of destination looks fine. I would like to ask you to try out an authentication request via Bruno/Postman and see if it succeeds. |
Indicates that the OAuth server you are using in the destination declined the request. But assuming this OAuth server issued the credentials you are using here, the OAuth server should accept the client credentials grant type. Try checking the If that doesn't help, contact the BDC team or whoever is responsible for this OAuth server. |
@rpanackal with bruno, everything seems to work fine: |
Here you are using the authorization code grant type which is meant for business users and a browser-based login. This is typically not suitable for technical communication. And you configured your destination to use the client credentials grant type instead. I assume with Bruno it fails when changing to client credentials grant type? If so, that would indicate that the client credentials grant type was explicitly disabled by DataSphere. So please reach out to them directly on what grant type to use / how to configure a destination. |
@MatKuhr adding (my) basic credentials to the destination results in a
|
@MatKuhr |
The guys from Datasphere told me, that OAuth 2 Client Credentials are not supported yet. The suggested to switch to OAuth 2 Authorization Code, but after deleting and recreating the destination in BTP, I still receive a
Screenshot of the new destination: |
Hi @MikeSchernbeck, the Cloud SDK does not support authentication via Authorisation Code. We thus recommend to wait until DataSphere provides support for Client Credentials. If you cannot wait that long, there is probably a way to make Authorisation Codes work through our SDK, but that would include significant custom coding from your side. The idea would basically be to manually change the headers for calls the DestinationAccessor makes to exactly that destination that needs to receive your authorisation code (you would need to get the authorisation code before that on your own). We do not recommend going that way and have not tested it, but it might work. If you still want to try it out, we can provide you with some information on how to change specific headers in the Cloud SDK. But that is basically all we could help you with. Best, |
Ask the Question
I am trying to connect to the OData API of SAP DataSphere. A destination has been created accordingly in the sub-account, the spring-boot application is running in. Checking the destination is successful. When retrieving an
HttpClient
, aDestinationAccessException
is thrownWhat is missing here to establish a connection?
The text was updated successfully, but these errors were encountered: