Maintain sessionID throughout the application

I need to have access to a session token which comes from the server. I can access system.sessionid, but its not the same as what we have on  server side. It is generated on the server side after user logs in. In response to login request I am able to get the sessiontoken. But I need accedss to it all the time inside the application for various rest api calls. How do I achieve it in Mendix?
1 answers

Hi Manish,

If you need to access the session in a microflow, you can retrieve it using the current user token. In a microflow, use the retrieve activity by association and expand "currentUser". From here, you can retrieve the list of sessions.


You can also use an inheritance split to cast the current session. 

Here is an example that does that.


Hope this helps!