> For the complete documentation index, see [llms.txt](https://icure.gitbook.io/icure/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://icure.gitbook.io/icure/icure-data-stack/icure-data-model/user.md).

# User

This entity is a root level object. It represents an user that can log in to the iCure platform. It is serialized in JSON and saved in the underlying icure-base CouchDB database.

## Properties

| Property                 | Type                                                                                                                                | Description                                                                                                                                                   |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id *`                   | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/String/README.md)           | the Id of the user. We encourage using either a v4 UUID or a HL7 Id.                                                                                          |
| `rev`                    | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/String/README.md)           | the revision of the user in the database, used for conflict management / optimistic locking.                                                                  |
| `deletionDate`           | [Long](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/Long/README.md)               | hard delete (unix epoch in ms) timestamp of the object. Filled automatically when deletePatient is called. format: int64.                                     |
| `created`                | [Long](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/Long/README.md)               | format: int64.                                                                                                                                                |
| `name`                   | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/String/README.md)           | Last name of the user. This is the official last name that should be used for official administrative purposes.                                               |
| `properties *`           | [List](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/PropertyStub/README.md)       | Extra properties for the user. Those properties are typed (see class Property)                                                                                |
| `permissions *`          | [List](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/Permission/README.md)         | If permission to modify patient data is granted or revoked                                                                                                    |
| `roles *`                | [List](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/String/README.md)             | Roles specified for the user                                                                                                                                  |
| `type`                   | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/String/README.md)           | Authorization source for user. 'Database', 'ldap' or 'token' Values: database, ldap, token                                                                    |
| `status`                 | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/String/README.md)           | State of user's activeness: 'Active', 'Disabled' or 'Registering' Values: ACTIVE, DISABLED, REGISTERING                                                       |
| `login`                  | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/String/README.md)           | Username for this user. We encourage using an email address                                                                                                   |
| `passwordHash`           | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/String/README.md)           | Hashed version of the password (BCrypt is used for hashing)                                                                                                   |
| `secret`                 | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/String/README.md)           | Secret token used to verify 2fa                                                                                                                               |
| `use2fa`                 | [Boolean](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/Boolean/README.md)         | Whether the user has activated two factors authentication                                                                                                     |
| `groupId`                | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/String/README.md)           | id of the group (practice/hospital) the user is member of                                                                                                     |
| `healthcarePartyId`      | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/String/README.md)           | Id of the healthcare party if the user is a healthcare party.                                                                                                 |
| `patientId`              | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/String/README.md)           | Id of the patient if the user is a patient                                                                                                                    |
| `autoDelegations *`      | [Map](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/List/README.md)                | Delegations that are automatically generated client side when a new database object is created by this user                                                   |
| `createdDate`            | [Date](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/Date/README.md)               | the timestamp (unix epoch in ms) of creation of the user, will be filled automatically if missing. Not enforced by the application server. format: date-time. |
| `termsOfUseDate`         | [Date](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/Date/README.md)               | the timestamp (unix epoch in ms) of the latest validation of the terms of use of the application format: date-time.                                           |
| `email`                  | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/String/README.md)           | email address of the user.                                                                                                                                    |
| `applicationTokens *`    | [Map](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/String/README.md)              | Long lived authentication tokens used for inter-applications authentication.                                                                                  |
| `authenticationTokens *` | [Map](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/user/AuthenticationToken/README.md) | Encrypted and time-limited Authentication tokens used for inter-applications authentication                                                                   |
