The Event Hook User activated is triggered when a user is sent an activation email and their status is changed to PROVISIONED.
Which event should I be subscribed to in order to capture when the user clicks on the link, creates their account and their status is changed to ACTIVE?
Replicate the flow with a test user, and go to your system log to discover all type of events that are emitted during the sequence of events. When you expand all, you’ll be able to see the debug data that will be available in your hook. Once you find the relevant hook, grab the event type:
None of these events is unique to a user clicking on an activation link and activating their account.
I find it surprising and a little disappointing that there are dozens of obscure event types I can subscribe to, but yet one of the most important (and most obvious) events in the system - the point a which a user becomes ACTIVE - is not catered for. Seems a huge oversight?
For anyone else struggling with this:
I have a temporary workaround by listening for the User update password for Okta event. This
event is triggered whenever any user changes their password, so it’s not ideal, because my listener will get a lot of unnecessary invocations, but it can filter the events to find newly activating users by:
I’m not entirely sure this will cover all eventualities; for example, it won’t work if the user is imported with a pre-existing password and then activated or the user is activated through Inbound Federation. But it’s better than nothing.
I’d still strongly encourage anyone from Okta reading this to consider implementing a relevant event type. There are lots of Use Cases for Event Hooks when a user becomes fully active.