<@U04UQ68083H> Can an Identity have two different ...
# ory-copilot
g
@chilly-king-10285 Can an Identity have two different password fields? For example one with the actual user password, and one with a random password that we set through the admin API
b
A message from kapa.ai
Based on the provided knowledge sources, an Identity in Ory Kratos cannot have two different password fields as you described. The identity model in Ory Kratos is designed to have a single set of credentials for each authentication method. According to the [Identity model documentation](https://www.ory.sh/docs/kratos/manage-identities/overview), an identity has a
credentials
section that represents all credentials associated with the identity. For password-based authentication, there is typically only one password field:
Copy code
yaml credentials:   password:     id: password     identifiers:       - [[email protected]](<https://www.ory.sh/cdn-cgi/l/email-protection>)       - [[email protected]](<https://www.ory.sh/cdn-cgi/l/email-protection>)     config:       hashed_password: ...
The system is designed to have a single password for each identity, which is used for authentication. There isn't a provision for storing multiple passwords or a separate "admin-set" password within the same identity. If you need to set or update a password through the admin API, you would be changing the existing password for that identity, not adding a second one. The [API documentation for updating identities](https://www.ory.sh/docs/reference/api) shows that you can update the password credentials, but it doesn't provide a way to add multiple password fields. If you have a specific use case that requires maintaining two different passwords, you might need to consider alternative approaches, such as using custom fields in the identity schema or leveraging the metadata fields. However, these would not function as actual authentication credentials in the same way as the primary password.