question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot connect to a SAP Cloud Platform OData service

See original GitHub issue

Hello,

First of all, I want to mention that I am aware of the following code:

SERVICE_URL = 'https://odata.example.com/Secret.svc'

session = requests.Session()
session.auth = ('MyUser', 'MyPassword')

theservice = pyodata.Client(SERVICE_URL, session)

However, I have created an ABAP service following this guide (more specifically, the service is created in step 3, Define and Expose a CDS-Based Travel Data Model). And, I got a service with the following structure:

<some_id>.abap-web.us10.hana.ondemand.com/sap/opu/odata/sap/<service_name>/

Here’s also the exact link if that’s necessary.

I cannot find any way to connect with it through PyOData. I imagine this is because SAP Cloud Platform uses OAuth2, while the example code above - HTTP Basic Auth. Still, I tried to input user and password data just to try, but that didn’t work. I also managed to get an authorization token (from an xssec security context), which I think it might help, but can’t see how to pass it properly.

Are there any suggestions for connecting to this service?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
filak-sapcommented, Aug 19, 2020

@s7oev Lets leave this open. I have to make sure PyOData works with ABAP RESTful Programming Model.

0reactions
s7oevcommented, Jul 19, 2021

solved by f7274f8505cccc9bbfc1877d68d550c68949a6c0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to connect to OData Service on Cloud Foundry Using ...
The problem got resolved by adding the missing "connectivity" service binding to the application. Now the OData request to BusinessPartner ...
Read more >
Connect to OData Service on Cloud Foundry Using SAP ...
1. If you have access to an SAP S/4HANA Cloud system with a technical user, you can skip this part.In order to make...
Read more >
Configure SAP Cloud Platform for on-premises systems
1. Having configured the SAP Cloud Foundry. · 2. Having an instance of the SAP Cloud Connector. · 3. A SAP S/4 HANA,...
Read more >
SAP OData connector for Amazon AppFlow
Private Connection Requirements · You need to create VPC Endpoint Service for your SAP OData instance running in a VPC. · When creating...
Read more >
Troubleshoot OData Connector for SAP Solutions - Mendix Docs
This might happen if the client ID and secret pair is invalid. The client ID and secret are fetched from SAP Cloud Portal...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found