User Shell Properties

User shell property accessors are defined when there is a current user.

Shell.User()

User object (input). The "current user" for the script and is always the logged-in user, except when used with the Notification context. In the Notification context, the script is executed once per subscriber, with Shell.User() referring to the subscriber being processed. If there are no subscribers, the script is executed one time with Shell.User() equal to the value Nothing.

Shell.UserToken()

string (output). Returns the user's SSO token in Base64-encoded format.

Example:

var token = Shell.UserToken();

Shell.IsActingAsAnotherUser()

bool (output). Returns true if the user is currently being impersonated.

Example:

var impersonated = Shell.IsActingAsAnotherUser();

Shell.ActingAsAnotherUserID()

long (output). If the shell context has a User property, and if the user is being impersonated, this returns the actual user's ID.

Example:

var actualId = Shell.ActingAsAnotherUserID();

Shell.NamespacePrefix()

string (output). Returns the namespace table prefixes for the user (this prefix is added to the dbname of every primary and auxiliary table when a process app is deployed to a namespace).

Shell.NamespaceID()

long (output). Returns the user's namespace ID.

Related Topics

Shell Property Descriptions

Shell Properties by Context