Skip to content

System.Security.getRoles

Description

Get roles of the currently logged in user.

Grammar

System.Security.getRoles(): string

 - Parameter

    Nothing

 - Return

    Roles, multiple roles separated by commas.

Code Example

Displays the role of the currently logged in person on a label.

const roles = System.Security.getRoles();
const label = await System.UI.findControl('Label1');
label.text = roles;
label.applyChanges();