Principal operations

The principal operations can be used with any Object Type for the script.

The object contains the user or group data, depending on the context of how the script is run. You can access principal data but not change it. You can use it to access the information of the user or group who caused a rule to run.

The type should not be assumed to be user or group, and, therefore, should be checked before using it to assign ownership or members to an object.

Type principal. to access the types of data, which are described in the following table.

Object Operations

Returns the ID of the user or group.


Returns the API name of the user or group.


Displays the name of the user or group. For a user, this is in the format, FirstName LastName.


Returns the user or group.