---
title: "Sys.User"
slug: "sysuser"
updated: 2024-08-21T07:30:26Z
published: 2024-08-21T07:30:26Z
canonical: "support.lusid.com/sysuser"
---

> ## 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

| **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` provider enables you to write a [Luminesce SQL query](/v1/docs/understanding-the-luminesce-sql-query-syntax) that lists information about [personal and service users](/v1/docs/what-are-a-personal-user-and-a-service-user) 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 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](/v1/docs/sysuserrole), [Sys.Connection](/v1/docs/sysconnection)

## Basic usage

```sql
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](/v1/docs/what-tools-are-available-to-write-luminesce-queries):

```sql
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](/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' 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](https://github.com/finbourne/luminesce-examples/tree/master/examples).

### Example 1: Retrieve first 10 users

```sql
select * from Sys.User limit 10
```

### Example 2: Retrieve service user accounts

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

### Example 3: Retrieve all active or provisioned personal accounts

```sql
select * from Sys.User where IncludeDeactivated = False
```

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

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