Views:
TypeRead/writeAuthorAvailability
Data providerReadFinbourneProvided with LUSID

The Sys.User provider enables you to write a Luminesce SQL query that lists information about personal and service users in Luminesce.

Note: The LUSID user running the query must have sufficient access control permissions to both use the provider and read system user data. This should automatically be the case if you are the domain owner. If you do not have access to user data then the query only returns your own user data.

See also: Sys.User.Role, Sys.Connection

Basic usage

select * from Sys.User where <filter-expression>;

Query parameters

Sys.User 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:

select FieldName, DataType, ParamDefaultValue, Description from Sys.Field where TableName = 'Sys.User' and FieldType = 'Parameter';

Data fields

By default, Sys.User 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:

select FieldName, DataType, IsMain, IsPrimaryKey, SampleValues, Description from Sys.Field where TableName = 'Sys.User' and FieldType = 'Column';

Note: Fields marked 'main' are returned by queries that include a caret character, for example select ^ from Sys.User.

    Examples

    Note: For more example Luminesce SQL queries, visit our Github repo.

    Example 1: Retrieve first 10 users

    select * from Sys.User limit 10

    Example 2: Retrieve service user accounts

    select * from Sys.User where Type = 'Service'
    

    Example 3: Retrieve all active or provisioned personal accounts

    select * from Sys.User where IncludeDeactivated = False

    Example 4: Retrieve user ID for a particular user email address

    select Id from Sys.User where EmailAddress = 'joe.bloggs@acme.com'