# List users

Launch stage: Public Preview

`GET /api/2.0/preview/scim/v2/Users`

Gets details for all the users associated with a Databricks workspace.

API scopes: scim

## Query parameters

- `attributes` (string, optional)
  Comma-separated list of attributes to return in response.
- `count` (int64, optional)
  Desired number of results per page.
  Constraints: `<= 100`
- `excludedAttributes` (string, optional)
  Comma-separated list of attributes to exclude in response.
- `filter` (string, optional)
  Query by which the results have to be filtered. Supported operators are equals(`eq`), contains(`co`), starts with(`sw`) and not equals(`ne`). Additionally, simple expressions can be formed using logical operators - `and` and `or`. The [SCIM RFC](https://tools.ietf.org/html/rfc7644#section-3.4.2.2) has more details but we currently only support simple expressions.
  Example: `displayName co "john" and userName co "doe"` : Users whose displayName contains john and userName contains doe.
  Example: `displayName co "doe"` : Users whose displayName contains doe.
  Example: `displayName eq "john"` : Users whose displayName equals john.
  Example: `displayName ne "john"` : Users whose displayName not equals john.
  Example: `displayName co "john" or userName co "doe"` : Users whose displayName contains john or userName contains doe.
  Example: `displayName sw "jo"` : Users whose displayName starts with jo.
- `sortBy` (string, optional)
  Attribute to sort the results. Multi-part paths are supported. For example, `userName`, `name.givenName`, and `emails`.
- `sortOrder` (string, optional)
  The order to sort the results.
  Possible values:
  - `ORDER_UNSPECIFIED`
  - `ascending`
  - `descending`
- `startIndex` (int64, optional)
  Specifies the index of the first result. First item is number 1.

## Returns

Returns a list of User objects.

## Response

```json
{
  "itemsPerPage": 0,
  "Resources": [
    {
      "active": true,
      "displayName": "string",
      "emails": [
        {}
      ],
      "entitlements": [
        {}
      ],
      "externalId": "string",
      "groups": [
        {}
      ],
      "id": "string",
      "name": {},
      "roles": [
        {}
      ],
      "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:User"
      ],
      "userName": "string"
    }
  ],
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:ListResponse"
  ],
  "startIndex": 1,
  "totalResults": 10
}
```

