> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# IOrganizationUserGroupsQuery

- Package: [@gooddata/sdk-backend-spi](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/index.md)
- Kind: interface
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-backend-spi/src/organization/users/index.ts

Service to query valid filter elements for particular filter.

**Signature:**

```typescript
export interface IOrganizationUserGroupsQuery 
```

## Methods

| Method | Description |
| --- | --- |
| [query()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iorganizationusergroupsquery/index.md#iorganizationusergroupsqueryquery) | Starts the organization users query. |
| [withFilter(filter)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iorganizationusergroupsquery/index.md#iorganizationusergroupsquerywithfilter) | Sets filter for the query. |
| [withPage(page)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iorganizationusergroupsquery/index.md#iorganizationusergroupsquerywithpage) | Sets starting page for the query. Backend WILL return no data if the page is greater than total number of pages. Default page: 0 |
| [withSize(size)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iorganizationusergroupsquery/index.md#iorganizationusergroupsquerywithsize) | Sets number of users to return per page. Default size is specific per backend |

## Method details

### IOrganizationUserGroupsQuery.query()

Starts the organization users query.

**Signature:**

```typescript
query(): Promise<IOrganizationUserGroupsQueryResult>;
```
**Returns:**

Promise&lt;[IOrganizationUserGroupsQueryResult](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iorganizationusergroupsqueryresult/index.md)&gt;

promise of first page of the results

### IOrganizationUserGroupsQuery.withFilter()

Sets filter for the query.

**Signature:**

```typescript
withFilter(filter: {
        workspace?: string;
        group?: string;
        name?: string;
        dataSource?: string;
    }): IOrganizationUserGroupsQuery;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| filter | { workspace?: string; group?: string; name?: string; dataSource?: string; } | filter to apply |

**Returns:**

[IOrganizationUserGroupsQuery](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iorganizationusergroupsquery/index.md)

organization user groups query

### IOrganizationUserGroupsQuery.withPage()

Sets starting page for the query. Backend WILL return no data if the page is greater than total number of pages. Default page: 0

**Signature:**

```typescript
withPage(page: number): IOrganizationUserGroupsQuery;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| page | number | zero indexed, must be non-negative |

**Returns:**

[IOrganizationUserGroupsQuery](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iorganizationusergroupsquery/index.md)

organization users query

### IOrganizationUserGroupsQuery.withSize()

Sets number of users to return per page. Default size is specific per backend

**Signature:**

```typescript
withSize(size: number): IOrganizationUserGroupsQuery;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| size | number | desired max number of organization users per page; must be a positive number |

**Returns:**

[IOrganizationUserGroupsQuery](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iorganizationusergroupsquery/index.md)

organization users query
