# IRPCVault.GetUsersAndUserGroupsList

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Vault API](https://developer.m-files.com/APIs/gRPC-API/vault/index.md) > [Vault information](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetUsersAndUserGroupsList/

Badges: `Vault API / core` `read` `session or assertion` `idempotent` `returns metadata structure version`

Gets the names of all users and user groups in one list, with group IDs negated.

- **Service:** [Vault information](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/index.md) `MFiles.IRPCVault`
- **gRPC method:** `/MFiles.IRPCVault/GetUsersAndUserGroupsList`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/get-users-and-user-groups-list`
- **Request:** [`GetUsersAndUserGroupsListRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetUsersAndUserGroupsList/index.md#request)
- **Response:** [`GetUsersAndUserGroupsListResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetUsersAndUserGroupsList/index.md#response)
- **Book and level:** Vault API, core
- **Kind:** read
- **Session:** Required: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata).
- **Idempotent:** yes
- **Returns metadata structure version:** yes (in the mfiles-metadata-version-bin trailer)
- **Streaming:** none (unary)

<a id="remarks"></a>

## Remarks

Convenient for a picker: users have positive `key` values (the user ID), groups negative values
(minus the group ID). For example group 102 appears as `-102`.

<a id="request"></a>

## Request: GetUsersAndUserGroupsListRequest

No fields.

<a id="response"></a>

## Response: GetUsersAndUserGroupsListResponse

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `users_and_user_groups[]` | repeated [`KeyNamePair`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.KeyNamePair/index.md) | Users (positive `key` = user ID) followed by user groups (negative `key` = minus the group ID). |
| `users_and_user_groups[].key` | `int32` | The unique key of the item. |
| `users_and_user_groups[].name` | `string` | The display name of the item. |

<a id="related"></a>

## Related methods

- [GetUsersAndUserGroups](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetUsersAndUserGroups/index.md): Gets all users and normal user groups of the vault as JSON.
