cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Custom CDS API - Fiori element - control on user

chris_SAP
Participant
1,323

I'm on S4 Public Cloud edition. 
I've created a custom CDS for seeing Purchase requisition of a requestor (based on user id).
The CDS works fine in Data browser

But I expose the CDS by using communication arrangement with a dedicated user.

I've created a Fiori Element App based on this API but the user taken into account is not the connection user but the user of the arrangement. I've deployed it on Cloud foundry (I have the possibility to deploy it also on Build Work Zone)

If someone has an idea to solve this issue. 
Get the user information in the Fiori element and Ask the API with this user ?

As I'm in a public version, I can't develop anything.

 

Dinu has provided a solution.
Dinu, do you know if I have something to change in the xs-app the use the oauth authentification ?

 

Accepted Solutions (1)

Accepted Solutions (1)

kaidehmann
Product and Topic Expert
Product and Topic Expert

Hi @chris_SAP,

OData services created with the Custom CDS view app do not support OAuth. See External API: Exposing a Custom CDS View as OData API: "You can only access the external API with the technical user you have created in the Communication Arrangements app and not with your business user."

Best regards
Kai

 

chris_SAP
Participant
0 Likes
Too sad. So I can't acheive my business requirement to only display information of the purchase requisition of a business user.
chris_SAP
Participant
0 Likes
So the approach proposed by Dinu (propagation of user) is just to use a SSO for the technical user ? (and not for the business user)
Dinu
Active Contributor
0 Likes

No Chris. What I suggested was the way to configure Principal Propagation. I was not aware that principal propagation is not supported for the scenario you were attempting. For using principal propagation you have to expose a custom business object as an OData service.

Answers (1)

Answers (1)

Dinu
Active Contributor
chris_SAP
Participant
0 Likes
Super, it should solve my issue. Still not working but this is the solution