There are two different ways I can think of to go about this.
- Without hooks
-
periodically have a job use the Okta App APIs to query for all the users of your particular application.
-
use the events API to query for all events you are interested in, but discard any events where a user id is not part of the list you collected in the first part
- With Hooks
-
The API that your hooks connect to would run the same above /app API to gather all users assigned your app
-
Then subscribe to event hooks interested in (activation/password change, etc) and filter users not interested in. Also make sure to setup the event hook of whenever a user is added/removed from your app so you could update the list dynamically.