gray-machine-46287
02/07/2025, 12:53 PMbrief-egg-61061
02/07/2025, 12:53 PMbrief-egg-61061
02/07/2025, 12:53 PMcredentials
field cannot be updated using this method: "The fields id
, stateChangedAt
and credentials
can not be updated using this method." To set a password for an identity, you would typically use the create or update identity endpoints, or import credentials during identity creation. For example, when creating an identity, you can include password credentials in the request body, as shown in the [Import identities documentation](https://www.ory.sh/docs/kratos/manage-identities/import-user-accounts-identities#importing-credentials): json { "schema_id": "<preset://email>", "traits": { "email": "<mailto:user@example.com|user@example.com>" }, "credentials": { "password": { "config": { "password": "the-password" } } } }
If you need to set or update a password for an existing identity, you should use the appropriate self-service flows or admin APIs designed for credential management, rather than the Patch an Identity endpoint.