Load User
Audience:
Low-code EngineersSkill Prerequisites:
Actions,User management
Loads one or more users into the action context. The last user loaded becomes the current user for the actions that follow. User tokens such as [User:DisplayName] return that user's values, and role-based actions use that user's roles.
Every loaded user is also added to the context's list of users. Some user actions work on everyone in that list, not just the current user.
It doesn't log anyone in or out. It only affects the rest of the current run of actions.
Typical Use Cases
- Update another user's profile with Update User Profile
- Load a user before granting or revoking roles
- Load several users and send each of them an email with Send Email
- Use another user's
[User:*]tokens in messages, emails or SQL
Don't use it to
- Load users that match a condition. Use Load Users from SQL instead.
- Log a user in. Use User Login instead.
Related Actions
| Action Name | Description |
|---|---|
| Load Users from SQL | Adds the users returned by a SQL query to the context's list of users. |
| Change User | Changes the current user for the actions that follow. |
| Update User Profile | Updates profile properties of the current user. |
| Grant User Role | Grants roles to the current user and to every user in the list. |
| Revoke User Role | Removes roles from the current user and from every user in the list. |
| Authorize User | Authorizes the current user and every user in the list. |
| Unauthorize User | Unauthorizes the current user and every user in the list. |
| Delete User | Deletes the users in the list. |
| Send Email | With Send mail to all users checked, sends one email to each user in the list. |
How users are found
Each identifier is looked up in this order:
- If it's a number, it's treated as a user ID. It's never matched as a username.
- Otherwise, it's matched against usernames.
- If no username matches, it's matched against email addresses.
Identifiers that don't match a user are skipped without an error.
Input Parameter Reference
| Parameter | Description | Supports Tokens | Default | Required |
|---|---|---|---|---|
| User Identifier | One or more users to load, as user IDs, usernames or email addresses. Separate several users with commas, for example 12, jane.doe, john.doe@example.com. The last user found becomes the current user. | Yes | empty string | Yes |
| Portal Id | The portal to search, as a portal name or portal ID. Leave it empty to search all portals. If the value doesn't match a portal name or a number, the current portal is searched. | Yes | empty string | No |
Considerations
- Actions may affect every loaded user. Delete User works on the whole list. Grant User Role, Revoke User Role, Authorize User and Unauthorize User work on the current user as well as the whole list. Check who's loaded before running them, or you might change or delete more users than you meant to.
- Loading again adds to the list. A second Load User changes the current user and adds its users to the list. A user already in the list isn't added twice. The list is never cleared by this action.
- Nothing found, nothing changes. If no identifier matches a user, the current user and the list stay as they were. Check the result with a condition before running actions that depend on it, for example
[User:Email] == "[Email]". - Inside Execute Actions. When Load User runs inside Execute Actions, the current user and the list go back to what they were once those inner actions finish.
- Scheduler jobs can already have the job's user in the list before any Load User runs.
- With an empty Portal Id, portals are searched in order and the first match wins. Set Portal Id if the same username exists on more than one portal.
Examples
To understand how to use the below examples, please see Running Examples.
1. Load a user and grant the Subscribers role
These actions load the user with the email john.doe@example.com, then grant that user the Subscribers role with no expiration date.
{
"Title": "Load User",
"ActionType": "LoadUser",
"Description": "Load the user into the context",
"Parameters": {
"Id": "john.doe@example.com",
"Portal": ""
}
}
{
"Title": "Grant User Role",
"ActionType": "GrantUserRole",
"Description": "Grant the Subscribers role",
"Parameters": {
"RoleId": {
"Expression": "",
"Value": "2",
"IsExpression": false,
"Parameters": {}
},
"RoleNames": "",
"DateSelectionMode": {
"Expression": "",
"Value": "OffsetFromNow",
"IsExpression": false,
"Parameters": {}
},
"ExtensionDays": "",
"StartDate": {
"Date": ""
},
"StartDateToken": "",
"ExpireDate": {
"Date": ""
},
"ExpireDateToken": "",
"RoleExpiration": ""
}
}
2. Load a user and update their first and last name
These actions load the user whose email is in the Email field. Then they update that user's FirstName and LastName profile properties from the FirstNameField and LastNameField fields.
{
"Title": "Load User",
"ActionType": "LoadUser",
"Description": "Load the user into the context",
"Parameters": {
"Id": "[Email]",
"Portal": ""
}
}
{
"Title": "Update User Profile",
"ActionType": "UpdateUserProfile.v2",
"Description": "Update the loaded user's first and last name",
"Parameters": {
"UserIdentifier": "",
"UpdatePasswordField": {
"Expression": "",
"Value": "",
"IsExpression": false
},
"UpdateDisplayNameField": {
"Expression": "",
"Value": "",
"IsExpression": false
},
"UpdateEmailField": {
"Expression": "",
"Value": "",
"IsExpression": false
},
"AdditionalProperties": [
{
"UserProfileProperty": {
"Value": "FirstName",
"IsExpression": false,
"Parameters": {}
},
"PropertyValue": {
"Value": "FirstNameField",
"IsExpression": false
}
},
{
"UserProfileProperty": {
"Value": "LastName",
"IsExpression": false,
"Parameters": {}
},
"PropertyValue": {
"Value": "LastNameField",
"IsExpression": false
}
}
]
}
}
Revised 09/26/2026