cancel
Showing results for 
Search instead for 
Did you mean: 

SAP CAP - User Authentication

former_member467269
Discoverer
0 Kudos

Hi all,

I am getting started on SAP CAP development, and using SAP WebIDE trail account for the same. I am referring to following URLs.

https://cap.cloud.sap/docs/
https://www.youtube.com/watch?v=eGOxt_acA7o&list=PLoc6uc3ML1JR38-V46qhmGIKG07nXwO6X

Code Snippets:
https://github.com/SAP-samples/hana-xsa-opensap-hana7

Once DB, SRV, and UI modules are completed (following above youtube series), I have attached UAA resource to SRV and UI modules and deployed my application to CF. Now if I launch my UI module, its taking me to SAP HANA XS Advanced login page. I am not sure which user credentials I need to provide! If I go ahead and create roles, and assign it my WebIDE user and login, will it authenticate me? Or do I need XSA user (If so, where can I create one on SAP WebIDE trail account)?

Can someone please advice me on how to overcome User login issue and proceed with the development.
If possible, can someone please share related documents/urls regarding UAA on SAP WebIDE trail account.

Thank you!

Accepted Solutions (1)

Accepted Solutions (1)

gregorw
Active Contributor

I hope you are aware of the OpenSAP Course: Building Applications with SAP Cloud Application Programming Model which is currently running. It shows you the most current way to get what you want.

qmacro
Developer Advocate
Developer Advocate
0 Kudos

That's a good suggestion, Gregor. Vimal - I recommend you check out Week 3 Unit 5 on Authorisation and Authentication, it may help a lot, given what you're looking for. https://open.sap.com/courses/cp7/items/y6qAYiWpxGJqIpCYpwzn6

former_member467269
Discoverer
0 Kudos

Thank you Gregor for your suggestion. I have enrolled the course and started working on Authorization and Authentication Module.
I'm trying to restrict the authorization which I have defined in xs-security.json and facing below issue.

(I'm still using SAP WebIDE full stack and not Business Studio)

Any help on this issue is much appreciated. Thank you!

Error


Error in console

CDS



Scopes



Role Templates



Roles


I have assigned Role Collection to my ID



gregorw
Active Contributor
0 Kudos

You can't directly call the srv endpoint. You have to setup the approuter of your ui module. You might get some inspiration from my bookshop-demo project.

Answers (1)

Answers (1)

former_member467269
Discoverer
0 Kudos

Thank you Gregor for your swift reply. I have done that part too! Please find below.
UI end point

xs-app.json