Skip to main content

The Current User object

Information about the current logged-in or authenticated user.

You can reference the current_user object when a workflow is manually run from the Workflow IDE or triggered from an app by a user. The evaluated current_user in workflows is the an admin in your organization’s instance or space. This differs from apps and agents, where the current_user is evaluated as the current, logged-in user. Workflows are always run as an admin role to ensure that when workflows are run without access to the current, logged-in user (such as when triggered by schedule or webhook), sufficient access to any resource on the control flow is guaranteed.

Run workflow as the current user

There is a public beta feature that allows your organization to run workflows as the logged-in user when workflows are manually run from the workflow IDE or triggered from an app by a user. Please be aware that, even with this beta feature activated, any workflow invoked via a webhook, query, or app trigger or by another workflow still assigns current_user as an admin user.

To set the current_user to null on automatic workflow runs, reach out to your account manager.

Properties

All properties for this object with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read property values.

email

The email address.

Type string
Format Email Address
Configurability Read-only
Defaultnull
Examples
jenny@example.com

externalIdentifier

The external identifier. This value is null if you are not using API-based authentication.

Type string
Configurability Read-only
Defaultnull

firstName

The first name.

Type string
Format Plain Text
Configurability Read-only
Defaultnull
Examples
"Jenny"

fullName

The full name.

Type string
Format Plain Text
Configurability Read-only
Defaultnull
Examples
"Jenny Appleseed"

groups

A list of assigned permission groups.

Type array
Array values object
Configurability Read-only
Defaultnull
Array Object Properties

id

The group ID.

Type string
FormatUUID
Configurability Read-only
Defaultnull

name

The group name.

Type string
FormatUUID
Configurability Read-only
Defaultnull

Examples
{
"id": "1234567890",
"name": "admin"
},
{
"id": "9876543210",
"name": "All users"
}

lastName

The last name.

Type string
Format Plain Text
Configurability Read-only
Defaultnull
Examples
"Appleseed"

locale

The locale.

Type string
Format Plain Text
Configurability Read-only
Defaultnull
Examples
"en"

metadata

Relevant metadata for the item.

Type array
Array values object
Configurability Read-only
Defaultnull

profilePhotoUrl

The profile photo URL. Available when using SSO authentication and is supplied by the IdP (Identity Provider).

Type string
Format URL
Configurability Read-only
Defaultnull
Examples
https://example.com/photo.jpg

sid

The unique, non-sequential ID.

Type string
FormatUUID
Configurability Read-only
Defaultnull
Examples
"user_366e154sdfg34b9bdeds32936"