Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
miltonc
Product and Topic Expert
Product and Topic Expert
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:

https://youtu.be/LdFWRFqJK2U

 

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/

 
2 Comments