Kanimozhi
Kanimozhi4mo ago

Store Password

Hi all, Can anyone confirm that is it possible for us to store a user without password and use that user ? I am using Google IDP, so I don't want to store the password in zitadel.
28 Replies
Kanimozhi
KanimozhiOP4mo ago
Or How to disable user initialization mail in which we set password?
Rajat Singh
Rajat Singh4mo ago
Hey @Kanimozhi thanks for your question, you can disable isEmailVerified upon user creation. More about it here.
Kanimozhi
KanimozhiOP3mo ago
Yeah, Thanks @Rajat Singh . Actually I got to know it and upgraded the zitadel version from v2.46.0 to v2.60.0 version. Now I am able to create users without password.
Kanimozhi
KanimozhiOP3mo ago
But I am in need of clarification, If I have created a user in v2 it is already in state of initialized right? I tried hitting sendinitialisation link but it is showing like user is already initialised.
No description
Rajat
Rajat3mo ago
hi @Kanimozhi Delete and recreate the user with isEmailVerified: false Or trigger password reset via updating the user (but again, only if not initialized).
ZITADEL Docs
Partially update an existing user.
Kanimozhi
KanimozhiOP3mo ago
Kindly check the above @Rajat
Rajat
Rajat3mo ago
hi @Kanimozhi there's an ongoing issue with https://github.com/zitadel/zitadel/issues/10083 Basically POST /v2/users/human --> works, created new user ✅ POST /v2/users/ --> works, search users successfully ✅ POST /v2/users/new --> 405 Method not allowed ❌ you can also update the issue with your findings and I can guide you what could be missing and also update the team about it.
Kanimozhi
KanimozhiOP3mo ago
So, I can use POST /v2/users/human --> works, created new user this right? I have created user using "/v2/users/human", where the user is always active never initial . Is it expected behaiviour? @Rajat Can you confirm this? Thank you so much for the above information.
Rajat Singh
Rajat Singh3mo ago
Hey @Kanimozhi newly created users do not have an “initial” state. Instead, they go straight to active by default. this is expected behavior.
Kanimozhi
KanimozhiOP3mo ago
Yeah, Thanks for conforming that. So, that means, the initialisation mail we can't resend as it is already initialised? The one I have shared above is due to this.
Kanimozhi
KanimozhiOP3mo ago
@Rajat I'll attach the screenshot again, for reference.
No description
Kanimozhi
KanimozhiOP3mo ago
Also v2 pats creation for machine user is not working for me, it is saying like "Not Found".
Rajat
Rajat3mo ago
hi @Kanimozhi yes this is the expected flow. Use the invite code flow to trigger an initialization again via the v2 API. This create (but doesn't send) a temporary invite code for the user. And then resend it this triggers sending the invite (password/passkey setup) via email or whichever delivery method is configured
Kanimozhi
KanimozhiOP3mo ago
Hi @Rajat , Can you see this screenshot, I am getting "Not Found" for the above API you shared as well.
No description
Rajat
Rajat3mo ago
hey @Kanimozhi it works for me.
curl --request POST '<your-zitadel-URL>/v2/users/<userID>/invite_code' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
curl --request POST '<your-zitadel-URL>/v2/users/<userID>/invite_code' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
No description
Kanimozhi
KanimozhiOP3mo ago
Oh really @Rajat , How will be the mail? Can you also share the user creation details?
Rajat
Rajat3mo ago
hi @Kanimozhi I didnt get it.
Kanimozhi
KanimozhiOP3mo ago
I wanted to confirm—if we trigger this API, will the user receive an email as part of the process? If possible, could you please share a screenshot of the email that is sent? Additionally, may I know which "Create User" API was used to create this user? @Rajat , If possible can you please share the above two details?
Rajat
Rajat3mo ago
hi @Kanimozhi when you make the reuqest and if the email is correct, it should.
No description
Kanimozhi
KanimozhiOP3mo ago
This is the mail, I got by creating an user without "isVerified" as true.
No description
Kanimozhi
KanimozhiOP3mo ago
@Rajat , Also by using the verify API, I can resend this mail. https://zitadel.com/docs/apis/resources/user_service_v2/user-service-resend-email-code
ZITADEL Docs
Resend code to verify user email
Rajat
Rajat3mo ago
hey @Kanimozhi awesome!. you can click on the link and it will let you intialise the user for first login with password
Kanimozhi
KanimozhiOP3mo ago
Thanks Rajat, But this is different API I used, the one we talk about was not working for me @Rajat .
Rajat
Rajat3mo ago
hey @Kanimozhi pls open an issue with the key findings that we discussed here.
Kanimozhi
KanimozhiOP3mo ago
Sure @Rajat, I have created, I have attached the issue link. https://github.com/zitadel/zitadel/issues/10107
GitHub
Send Invite Code - Issue · Issue #10107 · zitadel/zitadel
Creating an user using v2 API creates users with active state, instead “initial” state. After creating, send or resend initialisation is not possible as it is in active state. Tried using, send &qu...
Rajat
Rajat3mo ago
hi @Kanimozhi please attach the screenshots as well, just helps engineers to cut thru the noise and jump straight in the issue 🙂
Kanimozhi
KanimozhiOP3mo ago
Yeah, sorry I was about to add it but missed. Thanks @Rajat

Did you find this page helpful?