# IRPCUserGroupsAdmin.AddMemberToUserGroup

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Administration API](https://developer.m-files.com/APIs/gRPC-API/admin/index.md) > [User groups](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCUserGroupsAdmin/index.md)

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

Badges: `Administration API / specialized` `admin` `session`

Adds one user or group to a user group, if it is not a member yet.

- **Service:** [User groups](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCUserGroupsAdmin/index.md) `MFiles.IRPCUserGroupsAdmin`
- **gRPC method:** `/MFiles.IRPCUserGroupsAdmin/AddMemberToUserGroup`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/add-member-to-user-group`
- **Request:** [`AddMemberToUserGroupRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCUserGroupsAdmin/AddMemberToUserGroup/index.md#request)
- **Response:** [`AddMemberToUserGroupResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCUserGroupsAdmin/AddMemberToUserGroup/index.md#response)
- **Book and level:** Administration API, specialized
- **Kind:** admin
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** no
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

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

## Remarks

- Requires the vault rights `manage_users` and `license_allows_modifications`.
- Does nothing if the member is already in the group, so the call can be repeated safely.
- The member must suit the group's type; an unknown group fails with "Not found.".

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

## Request: AddMemberToUserGroupRequest

> 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 |
|---|---|---|
| `user_group` | `int32` | The ID of the group to add the member to. |
| `member_id` | `int32` | The user account ID, or the negated ID of a user group (-102 for group 102). |

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

## Response: AddMemberToUserGroupResponse

No fields.
