How to call an external api when Okta workforce sends a new user to Auth0

In auth0, I have setup a okta workforce connection, by which when adding an user in Okta, an user entry has been saved in auth0 through SCIM.

Now I want, when an user is added in Auth0 via Okta workfoce through OIDC SCIM integration, I should call an external api to retrieve user changes, when an user is deactivated in Okta later or at any stage, auth0 is showing"blocked", in such a case api will be triggered to update the status in my databse as well

Hi @gigox89242,

Welcome to the Auth0 Community!

You can use Actions. Use the post-register trigger to check if the user has been added using the Okta Workforce enterprise connection and call your external API.

For the other part, where you’re checking if the use exists in Okta, you won’t be redirected back to Auth0 if it doesn’t. So for that you will need a custom solution to update the status of the user from the database.

If you have any other question feel free to ask us.

Have a good one,
Vlad