--- title: "Sys.User.Role" slug: "sysuserrole" updated: 2024-08-21T07:31:43Z published: 2024-08-21T07:31:43Z canonical: "support.lusid.com/sysuserrole" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.lusid.com/llms.txt > Use this file to discover all available pages before exploring further. # Sys.User.Role | **Type** | **Read/write** | **Author** | **Availability** | | --- | --- | --- | --- | | [Data provider](/v1/docs/what-are-a-data-provider-and-a-direct-provider) | Read | Finbourne | Provided with LUSID | The `Sys.User.Role` provider enables you to write a [Luminesce SQL query](/v1/docs/understanding-the-luminesce-sql-query-syntax) that lists information about users and their assigned [roles](/v1/docs/what-is-a-role) in Luminesce. > **Note:** The LUSID user running the query must have sufficient [access control permissions](/v1/docs/creating-policies-to-control-access-to-providers-for-different-luminesce-end-users) to both use the provider *and* read user role data. This should automatically be the case if you are the domain owner. If you do not have access to user role data then the query only returns your own user role data. **See also:** [Sys.User](/v1/docs/sysuser) ## Basic usage ```sql select * from Sys.User.Role where ; ``` ## Query parameters `Sys.User.Role` has parameters that enable you to filter or refine a query. To list available parameters, their data types, default values, and an explanation for each, run the following query using a [suitable tool](/v1/docs/what-tools-are-available-to-write-luminesce-queries): ```sql select FieldName, DataType, ParamDefaultValue, Description from Sys.Field where TableName = 'Sys.User.Role' and FieldType = 'Parameter'; ``` ## Data fields By default, `Sys.User.Role` returns a table of data populated with particular fields (columns). You can return a subset of these fields. To list fields available to return, their data types, whether fields are considered 'main', and an explanation for each, run the following query using a [suitable tool](/v1/docs/what-tools-are-available-to-write-luminesce-queries): ```sql select FieldName, DataType, IsMain, IsPrimaryKey, SampleValues, Description from Sys.Field where TableName = 'Sys.User.Role' and FieldType = 'Column'; ``` > **Note:** Fields marked 'main' are returned by queries that include a caret character, for example `select ^ from Sys.User.Role`. ## Examples > **Note:** For more example Luminesce SQL queries, visit our [Github repo](https://github.com/finbourne/luminesce-examples/tree/master/examples). ### Example 1: Retrieve first 10 user roles ```sql select * from Sys.User.Role limit 10 ``` ### Example 2: Retrieve all roles assigned to a particular user ```sql select RoleCode from Sys.User.Role where UserId = '00usi5hab8sJgBgF8p7' ``` ### Example 3: Retrieve description for a particular role ```sql select RoleDescription from Sys.User.Role where RoleCode = 'lusid-administrator' ```