How to receive OTP when a user edits his/her email address in User Profile?

Hi All,

Firstly we are not using user name as the email address.

We have a use case where anyone updates their current email address in the user profile to a new email address, we want to send an OTP to the new email address to verify that email belongs to him only.

Can this be done in Okta? If yes, can you help me with some API’s or documentation or guidance on how to achieve this in Okta?



There is no built in way to do this that I know of.
You could setup an event hook for user.profile.updated
When your service receives an event check Debug Context to see if email was changed.

"debugContext": {
                    "debugData": {
                        "changedAttributes": "email",

If so go through the process of sending them a OTP.

1 Like