Skip to content

$ActiveUser

Represents the identity of the currently active user.

1
const $ActiveUser: Identity;

Remarks

This variable is only available in user-context scripts, such as module scripts.
Pre-work or post-work scripts are executed in a system context, and this variable is not available in those scripts.

Getting the active user's ID and name:

1
2
3
var user = $ActiveUser;
var userId = user.Id;
var userName = user.Name;