Show Change password pop up after first login

We are migrating from an existing idp to auth0. The existing is idp is built in to app , so it did not expose or have a way to get the data dump to export users to auth0.
So we planned to create users using api, and on then on initial login redirect to change password screen.
However I am having trouble writing the rule which can redirect to changepassword screen.
I looked this topic but,
Auth0 setting to force password reset after first login? - #9
So instead of triggering change password screen , what should be the steps to open the change password pop up.

Thank you

Hi @adale

I am not understanding: if you create the users using the API, how do they do the initial login? Are you creating a password for them and giving them the password?

If so, that is not a secure practice.

Instead, you should create them with an unknown password (generate a random string and then forget it/don’t save it anywhere) and send the new user a reset password link.

That avoids the “change password” screen you are trying to do, plus is more secure.