on 01-13-2015 3:36 AM
Dear all,
I have a task to retrieve hana cloud account's email from my mobile app. Is it possible to do it? I tried to do it much but i could not find any documentations talk about that.
Hello Thuan,
I am not sure exactly what you require.
If we are talking about the cloud account on which the application is hosted (i.e. the one with which you log into the cockpit), then you might have a look at the com.sap.cloud.account Java package. Unfortunately, from what I can see, there is no way to get the Email address (the TenantContext only has methods for getting the account name / tenant ID. This should work for Java based applications / services for a multi-tenant context (normally it should work on the single tenant context as well).
If you want the current end-user's email account, then it depends if the identity provider (IdP) you are using is also shipping the email address as part of the user attributes. The default IdP is SAP ID, and it does fill in the email address by default. To access it from a Java application, check out Working with user profile attributes (from HCP help), for HTML5 application: Accessing the user API and for an XS application: samlUserInfo object.
Regards,
Serban
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
the user's email address should be part of the user attributes as per:
https://help.hana.ondemand.com/help/frameset.htm?9e2e0d7e91cc44e79901a756bf7b2d88.html
however, that said, I can't get the reading of the user attributes to work in the first place
It will depend of course on what attributes the IdP connecting to the HCP account provides - if the IdP provides email address, you should be able to read it.
hope that helps,
Cheers,
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.