Problems getting GET Request work with SAP Datasphere via Microsoft Authenticator

image

We are testing SAP Datasphere.

We want to let our users use KNIME to consume data from the exposed OData API. See Consume Data via the OData API.

If we take the example URL:
https://datasphere-tenant.eu10.hcs.cloud.sap/api/v1/dwc/catalog/spaces

We can see the json data in the browser.

We use the “Microsoft Authenticator” node.

Then running the Node, a pop-up is shown for Approval.
image

After requesting approval, our Azure Admin was notified and granted access.

We can login and then execute “Microsoft Authenticator” successfull.

Then we use a “GET Request” node, and add a Credential Port.

The try to GET: /api/v1/dwc/catalog/spaces

But we just get an “Execute failed: Wrong status: 401 Unauthorized”

image

Does anyone know how to debug this?

  • Is this maybe a API/scope setting in Azure?
  • Or is Token passing from Microsoft Authenticator node to GET Request not working?
  • Or is it maybe configuration in Datasphere ?

Solved

  • Create Credential widget
    • Variable Name=basicauth (Whatever)
    • Username is set to client_id: sb-xxxxx|client!b3xx0
    • Password is set to client_secret: 949287b5-0b44-4d41-xxxxxxxxx
    • Tick: Save password in configuration

image

  • Create: OAuth2 Authenticator
    • Authorization endpoint URL: https://datasphere-<tenant>.authentication.eu10.hana.ondemand.com/oauth/authorize
    • Token endpoint URL: https://datasphere-<tenant>.authentication.eu10.hana.ondemand.com/oauth/token
    • Client/App type = Confidential
    • Client/App ID and secret : Point to Credential : basicauth
    • Redirect URL: (Match Redirect URI set in SAP OAuth Client setup): http://localhost:8080/

Click Login. It opens a browser window. Just close it. No need to store code
token or anything. Execute node so it’s green. Token is stored.

Get Requests

Add Credential Port

Just use Address:
https://datasphere-<tenant>.x.cloud.sap/api/v1/dwc/catalog/spaces

Extract JSON value list

Table out

image

2 Likes