Technical Articles
How to get logged in user in SAP Cloud Platform (Neo environment)
Github repository:
To be published soon…
Introduction:
- In this session, we will look at how to get the logged in user in SAP Cloud Platform (Neo environment)
Synopsis:
- SAP Cloud Platform can be set up with any Identity Provider that supports SAML
- When building SAPUI5 applications, we can require that users be authenticated against this Identity Provider
- There may be many instances where you might want to display user specific messages on the home page (for example, some form of welcome message) – and for this you need to know the logged in user
Steps:
- SAP Cloud Platform provides an userapi service that can readily give you the current logged in user
- So it’s just a matter of calling the userapi service from within your application and displaying the user information in the user interface
- We could make a simple REST API call using the window’s fetch command in our controller files
YouTube link:
Conclusion:
- This video should give you a clear idea on how to get the logged in user in SAP Cloud Platform Neo environment
- In the next video, we will look at how to get the logged in user in SAP Cloud Platform Cloud Foundry environment
- If you have any questions or comments, please list them below and I will be happy to answer
Related post:
https://blogs.sap.com/2020/08/23/how-to-get-logged-in-user-in-sap-cloud-platform-cloud-foundry/
Hello Milton,
Thank you for a very informative post. Going ahead, can we get a list of all logged in users in SAP BTP Neo environment? Maybe via some analytics tool in BTP
I received a very helpful reply from Ivan Mirisola.
https://answers.sap.com/questions/13914735/can-we-get-a-list-of-all-logged-in-user-in-sap-btp.html