cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get the XS session ID?

Former Member
0 Kudos

Hi all,

I'm trying to determine the authentication method used for the current XS session user. Apart from the "samlUserInfo" property, there's no indication of the authentication method on the $.session object.  I found that the M_XS_SESSIONS table contains this info, but i'm not sure how to get the "XS_SESSION_ID" field in order to look up the record corresponding to the current user. 

Any suggestions?  We have HANA SPS10.

Thanks,

Charles

Accepted Solutions (0)

Answers (1)

Answers (1)

SergioG_TX
Active Contributor
0 Kudos

Charles,

if you are looking for the XS session id to debug, instead of looking into the xs code, open the developer tools on google chrome and look for the xs session id.. or xs cookie. I believe that is what you are looking for.

Former Member
0 Kudos

Hi Sergio,

I took a look and the datatypes don't match. The XS session cookie is a guid (in my case "xsIdA4EE0CF02EFDF3E5BD5AEF1B34AF71D5=16C841432BE14C49A1BDDA3223632406") while the XS_SESSION_ID field is a BIGINT (for my session the value is 514).

SergioG_TX
Active Contributor
0 Kudos

Hi Charles, where are you seeing the XS_SESSION_ID as big int?? the session id.... if you need it to debug you need to get it from the chrome developr tools and after you set up the debugging session on your studio then you can select the GUID... yes you should be using a GUID as your session id

Former Member
0 Kudos

Hi Sergio... XS_SESSION_ID is a big int on this system view: M_XS_SESSIONS - SAP HANA SQL and System Views Reference - SAP Library.  I'm trying to query this view to get the value of the AUTHENTICATION_METHOD field. I don't really care too much about the XS session ID value, except to look up the current session in this table.

SergioG_TX
Active Contributor
0 Kudos

ok.. then I don't know exactly how to get that, based on the api documentation.. that's not available.. unless I missed it.. here is the url to the documentation to the $.session api

http://help.sap.com/hana/SAP_HANA_XS_JavaScript_API_Reference_en/$.Session.html

former_member197071
Participant
0 Kudos

Hi Sergio,

Once clearing cache and cookies from Chrome browser, I am not receiving any Cookie