Menu Icon

Using Session Parameters

Show user names or send users' information to backend APIs and models to filter data.

Using inside JavaScript area

If you want access session parameters inside a JavaScript editor in a flow, you can access it like _scd.userName. For the complete set of variables, check the table at the end of the page.

Using on components (such as Label)

You may also put session variables inside any component that can show a text value. For example, you may create a profile page and set the text value of a Label component from session variables by setting the value to something like ${scd.userName}.

Using on REST editor and Model filters

It is also easy to use session variables on Parameter pages. When you choose User/Session for the Source field, you can send session values. You don't need to use scd or _scd prefix on Parameter dialogs. You may use the variable name directly as shown in the picture below. In this case it is userId.

Complete list of session variables

Complete list of session variables with sample values.

KeySample ValueDescription
roleId"roleId":"ZCMLupofhy"User’s Role Id
fullName"fullName":"Test User"User’s Name
rbac"rbac”: 1If Role Based Authentication Control is enabled for the project via User Management Plugin.
sessionId"sessionId": "31BFCA8576E417D36999B8AE0159C734"Session Id If user logged in
userName"userName":""User’s Username
userId"userId":552User’s Id
projectName"projectName":""Project Name
projectId"projectId":"e003548a-a8c9-40d2-86b9-4346cd993baa"Project Id
email"email":""User’s Email Address
preview"preview":"true"If the session is in Preview mode