DamandeepD.04133 (Nava Ventures Ltd.) asked a question.
Hi,
I am user Rest User API to manage my application's users. Here are the step I wanted to implement:
- Create the user with password. Link https://developer.okta.com/docs/reference/api/users/*create-user-with-password
- Send the activation link to the email used to create the user in Step 1. Link https://developer.okta.com/docs/reference/api/users/*create-user-with-password
Current Behaviour
Email did got sent out, but at this point the user is already activated even if user had not clicked the activation link.
Expected Behaviour
When the activation email is sent out the user needed to click on the link to activate the account.
I am not sure if I am missing a step of I am using wrong flow or something.
Thanks for the help in advance.


When you create a user with a password, the account is activated immediately (it also behaves this way when you create an account in the console). There's even a warning on the developer site about not generating another activation token after creating a user with a password.
In my opinion, you should use the Create User without Credentials method (https://developer.okta.com/docs/reference/api/users/#create-user-without-credentials), and then send an activation email to the user. That will prompt the user to click a link to activate their account, then Okta will guide them through setting their own password and whatever account recovery options you have enabled. This also eliminates the need for you to track and transmit any passwords, so the process is more secure.
I hope that helps!