Skip to Content
avatar image
Former Member

How to get the hana cloud account's email

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jan 13, 2015 at 06:56 AM

    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 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.



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thank Serban. Your answer is quite sufficient. I am building SAP Mobile Application and want to get Hana Cloud User information( the one which i log into the cockpit) and base on the email address which is return from Hana Cloud to use in my mobile app

  • Jan 13, 2015 at 06:33 AM


    the user's email address should be part of the user attributes as per:

    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,



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks for your quick answer so much. Though It is not really correct in my case but I got some ideas to do my app.