# List Groups

Launch stage: GA

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

Gets all details of the groups associated with the <Databricks> workspace.

API scopes: scim

## Query parameters

- `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.
- `attributes` (string, optional)
  Comma-separated list of attributes to return in response.
- `excludedAttributes` (string, optional)
  Comma-separated list of attributes to exclude in response.
- `startIndex` (int64, optional)
  Specifies the index of the first result. First item is number 1.
- `count` (int64, optional)
  Desired number of results per page.
  Constraints: `<= 100`
- `sortBy` (string, optional)
  Attribute to sort the results.
- `sortOrder` (string, optional)
  The order to sort the results.
  Possible values: `ORDER_UNSPECIFIED`, `ASCENDING`, `DESCENDING`

## Returns

- `itemsPerPage` (int32, optional)
  Total results returned in the response.
- `Resources` (array of object, optional)
  User objects returned in the response.
  - `displayName` (string, optional)
    String that represents a human-readable group name
  - `entitlements` (array of object, optional)
    Entitlements assigned to the group. See [assigning entitlements](https://docs.databricks.com/administration-guide/users-groups/index.html#assigning-entitlements) for a full list of supported values.
    - `display` (string, optional)
    - `primary` (boolean, optional)
    - `$ref` (string, optional)
    - `type` (string, optional)
    - `value` (string, optional)
  - `externalId` (string, optional)
    external_id should be unique for identifying groups
    Constraints: `<= 64 characters`
  - `groups` (array of object, optional)
    - `display` (string, optional)
    - `primary` (boolean, optional)
    - `$ref` (string, optional)
    - `type` (string, optional)
    - `value` (string, optional)
  - `id` (string, optional)
    <Databricks> group ID
  - `members` (array of object, optional)
    - `display` (string, optional)
    - `primary` (boolean, optional)
    - `$ref` (string, optional)
    - `type` (string, optional)
    - `value` (string, optional)
  - `roles` (array of object, optional)
    Corresponds to AWS instance profile/arn role.
    - `display` (string, optional)
    - `primary` (boolean, optional)
    - `$ref` (string, optional)
    - `type` (string, optional)
    - `value` (string, optional)
  - `schemas` (array of string, optional)
    The schema of the group.
    Possible values: `GROUP_SCHEMA_UNSPECIFIED`, `URN_IETF_PARAMS_SCIM_SCHEMAS_CORE_2_0_GROUP`
- `schemas` (array of string, optional)
  The schema of the service principal.
  Possible values: `LIST_RESPONSE_SCHEMA_UNSPECIFIED`, `URN_IETF_PARAMS_SCIM_API_MESSAGES_2_0_LIST_RESPONSE`
- `startIndex` (int64, optional)
  Starting index of all the results that matched the request filters. First item is number 1.
  Default: `1`
- `totalResults` (int32, optional)
  Total results that match the request filters.

## Response

```json
{
  "itemsPerPage": 0,
  "Resources": [
    {
      "displayName": "string",
      "entitlements": [
        {}
      ],
      "externalId": "string",
      "groups": [
        {}
      ],
      "id": "string",
      "members": [
        {}
      ],
      "roles": [
        {}
      ],
      "schemas": [
        "string"
      ]
    }
  ],
  "schemas": [
    "string"
  ],
  "startIndex": 0,
  "totalResults": 0
}
```

