--- title: "system.user.getRoles" description: "Returns a sequence of strings representing all of the roles configured in a specific user source." --- # system.user.getRoles > Returns a sequence of strings representing all of the roles configured in a specific user source. This function is used in **Python Scripting**. ## Description ## Client Permission Restrictions This scripting function has no [Client Permission](ignition-modules\vision\vision-project-properties\vision-project-properties.md#vision-permissions-properties) restrictions. ## Syntax `system.user.getRoles(userSource)` ### Parameters Type | Parameter | Description ------- | ------- | ------ String | `userSource` | The user source to fetch the roles for. ### Returns **List** - A List of strings that holds all the roles in the user source. ### Scope Gateway, Vision Client, Perspective Session ## Code Examples ```python title="Example #1" # This example will print a list of all user roles in the default user source: roles = system.user.getRoles("") for role in roles: print role ```