Post-user-registration action not triggered after manage API createUser


I have created and tested Post-user-registration action from the dashboard, but when I’m using createUser from the management API it’s not triggering it.

ps: Auth0 returns the correct user and it’s well created.

Any idea ?

Hi @r.cauquil,

Welcome to the Auth0 Community!

I understand that your Post-User Registration Action did not trigger after you created a user using the Management API.

After testing this myself, I did not find the same observations. Instead, my Post-User-Registration Action is working regardless if I created the user using the Auth0 Dashboard, Management API, or registering on the sign-up page.

In this case, I believe that you may have an issue with your Action/Flow. Could you try adding a console.log() statement at the top of your function and verify that your action is working in the Real-time Webtask Logs Extension?

And, could you please double-check that you added your Custom Action into your Flow and saved those changes?

Looking forward to your response.

Thank you.

Hi @rueben.tiow

Thank you, I’ve completly forgot to put it in the flow as I tried the action itself from action dashboard and as it was working I assumed it was “done”…

:white_check_mark: Working great now.

Another issue: Bad payload in event.user

When I create the user with given_name and familly_name both are well added in dashboard but here is the event.user payload I get:

I have *** ids, tenant and long strings for this comment

user {
  email: '',
  tenant: '***',
  user_id: 'auth0|***',
  app_metadata: {},
  user_metadata: {},
  created_at: undefined,
  updated_at: undefined,
  email_verified: true,
  phone_verified: false

which does not correspond to what I should get from documentation event.user

On the other hand the reponse from the function to create the user is correct.

  created_at: '2021-11-12T09:02:48.949Z',
  email: '',
  email_verified: true,
  family_name: 'Bar',
  given_name: 'Foo',
  identities: [
      connection: 'Username-Password-Authentication',
      user_id: '***',
      provider: 'auth0',
      isSocial: false
  name: '',
  nickname: 'foo',
  picture: '***',
  updated_at: '2021-11-12T09:02:48.949Z',
  user_id: 'auth0|***'

Hi @r.cauquil,

Thank you for your reply!

I am following up on your previous Posts here.

After testing the Post-User-Registration Action extensively, I managed to reproduce the same issues.

In this situation, I will reach out to our Engineering teams to inform them about this bug and have them resolve the issue.

In the meantime, you could work around this issue by using the Management API with Actions and requesting the Get a User by ID endpoint and filtering for the family_name and given_name attributes. Then, you can proceed to use these attributes for your implementation in the Post-User-Registration Action script.

You can learn more in our FAQ on How can I use the Management API in Actions?.

Please let me know if you have any questions. I’d be happy to clarify.

Thank you.

1 Like

@rueben.tiow thank you for your support.
Please let me know once it’s fixed, I’ll workaround like that for the moment.

Have a great day

1 Like

Hi @r.cauquil,

You’re welcome!

Yes, most definitely. I will follow up with you as soon as our Engineers have resolved the issue.

Thank you.

1 Like

Hi @r.cauquil,

Our Engineers informed me that they have gotten my request and will be implementing the changes once our code freeze has lifted.

Once I have more information, I will follow up with you on the updates.


1 Like

Thank you @rueben.tiow for the feedback.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.