# UserOrUserGroupID

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Reference](https://developer.m-files.com/APIs/gRPC-API/Reference/index.md) > [Messages](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/index.md)

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

User or user group ID.

- **Full name:** `MFiles.UserOrUserGroupID`
- **Proto file:** [`mfiles/structs.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/structs.proto)

<a id="fields"></a>

## Fields

| Field | Type | Number | Description |
|---|---|---|---|
| <a id="f-type"></a>`type` | [`UserType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.UserType/index.md) | 1 | User type. Values: `USER_TYPE_UNKNOWN` (0), `USER_TYPE_USER` (1), `USER_TYPE_USER_GROUP` (2), `USER_TYPE_WORKFLOW_STATE_PSEUDO_USER` (3), `USER_TYPE_PROPERTY_BASED_PSEUDO_USER` (4). |
| <a id="f-id"></a>`id` | `int32` | 2 | User or user group. |

<a id="used-by-methods"></a>

## Used by methods

- [IRPCEvents.SendCustomNotification](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCEvents/SendCustomNotification/index.md): Sends an e-mail with the given subject and body to users, groups and e-mail addresses.
- [IRPCSubstituteUsers.GetSubstituteUsers](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSubstituteUsers/GetSubstituteUsers/index.md): Gets the substitutes of the calling user.
- [IRPCSubstituteUsers.GetSubstituteUsersOfUser](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSubstituteUsers/GetSubstituteUsersOfUser/index.md): Gets the substitutes of any user (administration).
- [IRPCSubstituteUsers.GetUsersBySubstituteUser](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSubstituteUsers/GetUsersBySubstituteUser/index.md): Gets the users for whom a given user is a substitute, directly or through group membership (administration).
- [IRPCSubstituteUsers.SetSubstituteUsers](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSubstituteUsers/SetSubstituteUsers/index.md): Replaces the substitutes of the calling user.

<a id="used-in-fields"></a>

## Used in fields

- [`SessionInfoServer.substitute_users`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SessionInfoServer/index.md#f-substitute_users): The user ID of this session's account, as well as the users for which the user is a substitute. The first ID in the vector is the user ID. Others are the IDs of the users for which the user is a substitute.
- [`SessionInfoServer.user_and_group_memberships`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SessionInfoServer/index.md#f-user_and_group_memberships): The user ID of this session's account, as well as the groups to which the user belongs either directly or indirectly. The first ID in the vector is the user ID. Others are group IDs.
- [`VaultData.substitute_users`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.VaultData/index.md#f-substitute_users): `user_id` first, followed by the users for whom this user is a substitute.
- [`VaultData.user_and_group_memberships`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.VaultData/index.md#f-user_and_group_memberships): `user_id` first, followed by the user groups the user belongs to, directly or indirectly.
- [`SendCustomNotificationRequest.uugidarr`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCEvents/SendCustomNotification/index.md#request): The recipient users and user groups.
- [`GetSubstituteUsersResponse.substitutes`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSubstituteUsers/GetSubstituteUsers/index.md#response): The users (`USER_TYPE_USER`) and user groups (`USER_TYPE_USER_GROUP`) who substitute for the caller.
- [`SetSubstituteUsersRequest.substitutes`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSubstituteUsers/SetSubstituteUsers/index.md#request): The complete new list of substitutes: users (`USER_TYPE_USER`) and user groups (`USER_TYPE_USER_GROUP`).
- [`GetSubstituteUsersOfUserResponse.substitutes`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSubstituteUsers/GetSubstituteUsersOfUser/index.md#response): The users and user groups who substitute for that user.
- [`GetUsersBySubstituteUserResponse.users`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSubstituteUsers/GetUsersBySubstituteUser/index.md#response): The users (`USER_TYPE_USER`) for whom `user_id` is a substitute.
