on 08-05-2020 10:26 AM
Hi Experts,
I am working a SAPUI5 application in SAP Cloud Foundry. I have a requirement to get the logged in user details such as email id, name etc in the application. I am trying to follow the steps which robiocko described in the following blog:
https://blogs.sap.com/2019/05/23/how-to-get-the-email-of-the-logged-in-user-in-cloud-foundry/
Here is what all i had done:
1) Created an instance of XSUAA service in CF
2) in Postman, I called the following URL to get the access token:
https://accountName.authentication.us10.hana.ondemand.com/oauth/token?grant_type=client_credentials
3) After getting the access token, in postman, i am calling following service with being passed in header access token:
https://api.authentication.us10.hana.ondemand.com/userinfo
i am getting the error: "The subdomain does not map to a valid identity zone"
but i am able to call other UAA services successfully such as:
https://api.authentication.us20.hana.ondemand.com/Users (With this i get the list of all the users. But i need the details of Logged in user only)
Can anyone please advise how can i solve the issue for the userinfo service
Thanks
Hi,
you can create a endpoint in your backend service in which you can decode the JWT via the SAP Cloud SDK and return the user informations of the JWT in this endpoint.
See also Wouter's Blog.
Regards
Simon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.