[Kratos] How to create new user without self-service registration for user management


I’ve been using this about 4 months, really enjoy using ORY Kratos as Login provider. This is a great tool!

Ok, I want to create a new user or identity without self-service registration on my user management. Well, for example, I have an identity or user with role as Administrator. This admin want to create a new user from user management page. I’ve read the API documentation and mentioned that we can create a new identity but it’s not possible to set the password https://www.ory.sh/kratos/docs/reference/api#create-an-identity.

This endpoint creates an identity. It is NOT possible to set an identity’s credentials (password, …) using this method! A way to achieve that will be introduced in the future.

I’ve tried to set registration flow config like this:


But yes, it should be redirected to the main page or home page if the user (admin) has logged in when the application access the initialize registration url (/self-service/browser/flows/registration).

I hope I can create a new identity from the API and set the credential’s password.

Have any ideas? Am I missed some steps from documentation.

Have you seen https://www.ory.sh/kratos/docs/admin/managing-users-identities ?

1 Like

Wow, this is fresh! Thank you very much. As I thought before, I’ve to using Account Recovery for inviting user via e-mail. Well, I’ll learn the documentation from your link.

I’m trying to looking for oryd/kratos docker image with tag/version 5 for use Create Recovery Link API endpoint (administrative) https://www.ory.sh/kratos/docs/reference/api#create-a-recovery-link. But it still v0.5.0-alpha.pre.0-sqlite for SQLite. I’m looking forward for the latest tag of kratos docker image :slight_smile:

Hey there, the release is now out - enjoy :slight_smile:

1 Like

Thank you very much! Sorry for my late response.

I’ve tried the latest version of ORY Kratos, but I faced a problem. My web application and ORY Kratos is using PostgreSQL. When I rebuild the service, ORY Kratos cannot migrated and produce this error:

The error log said “unsupported dialect sqlite3”, even though I’m not using SQLite.

Here is the piece of my docker-compose configuration for ORY Kratos command:

This warning appeared when the system used the previous version but it was still running and ORY Kratos worked properly.

Is the latest version of ORY Kratos still support PostgreSQL for database / identity storage?

Thank you!

Hi. As far as I understand the flows, to set a password for freshly created account we create recovery link. But is there any way to use admin API to generate link without sending it to a user email? I would like to avoid setting up an SMTP server for now.

For now, I get the The identity does not have any recovery addresses set. error.

You can set up a recovery address and just set a stub smtp://foo:[email protected]/ smtp server. The guide I link explains clearly that you will receive a link.

Oh, ok. Will try, thanks.