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

**URL:** <https://community.auth0.com/t/post-user-registration-action-not-triggered-after-manage-api-createuser/73006>\
**Category:** Get Help\
**Created:** [November 11, 2021, 5:23pm UTC](https://community.auth0.com/t/post-user-registration-action-not-triggered-after-manage-api-createuser/73006 "2021-11-11T17:23:10Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![r.cauquil](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/r.cauquil/32/12962_2.png) [@r.cauquil](https://community.auth0.com/u/r.cauquil)\
**Post date:** [November 11, 2021, 5:23pm UTC](https://community.auth0.com/t/post-user-registration-action-not-triggered-after-manage-api-createuser/73006/1 "2021-11-11T17:23:10Z")

</div>

Hi,

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 ?

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [November 12, 2021, 12:06am UTC](https://community.auth0.com/t/post-user-registration-action-not-triggered-after-manage-api-createuser/73006/3 "2021-11-12T00:06:16Z")

</div>

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](https://auth0.com/docs/extensions/real-time-webtask-logs)?

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.

---

<div class="post-metadata">

**Author:** ![r.cauquil](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/r.cauquil/32/12962_2.png) [@r.cauquil](https://community.auth0.com/u/r.cauquil)\
**Post date:** [November 12, 2021, 9:10am UTC](https://community.auth0.com/t/post-user-registration-action-not-triggered-after-manage-api-createuser/73006/4 "2021-11-12T09:10:19Z")

</div>

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”…

✅ **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

```auto
user {
  email: 'foo@bar.com',
  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](https://auth0.com/docs/actions/triggers/post-user-registration/event-object)

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

```auto
{
  created_at: '2021-11-12T09:02:48.949Z',
  email: 'foo@bar.com',
  email_verified: true,
  family_name: 'Bar',
  given_name: 'Foo',
  identities: [
    {
      connection: 'Username-Password-Authentication',
      user_id: '***',
      provider: 'auth0',
      isSocial: false
    }
  ],
  name: 'foo@bar.com',
  nickname: 'foo',
  picture: 'https://s.gravatar.com/***',
  updated_at: '2021-11-12T09:02:48.949Z',
  user_id: 'auth0|***'
}

```

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [November 15, 2021, 6:51pm UTC](https://community.auth0.com/t/post-user-registration-action-not-triggered-after-manage-api-createuser/73006/5 "2021-11-15T18:51:07Z")

</div>

Hi @r.cauquil,

Thank you for your reply!

I am following up on your previous Posts [here](https://community.auth0.com/t/event-user-with-missing-properties-executing-an-auth0-custom-action/72433).

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](https://auth0.com/docs/api/management/v2#!/Users/get_users_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?](https://community.auth0.com/t/how-can-i-use-the-management-api-in-actions/64947).

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

Thank you.

---

<div class="post-metadata">

**Author:** ![r.cauquil](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/r.cauquil/32/12962_2.png) [@r.cauquil](https://community.auth0.com/u/r.cauquil)\
**Post date:** [November 15, 2021, 10:14pm UTC](https://community.auth0.com/t/post-user-registration-action-not-triggered-after-manage-api-createuser/73006/7 "2021-11-15T22:14:15Z")

</div>

@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

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [November 16, 2021, 1:03am UTC](https://community.auth0.com/t/post-user-registration-action-not-triggered-after-manage-api-createuser/73006/8 "2021-11-16T01:03:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [November 19, 2021, 8:46pm UTC](https://community.auth0.com/t/post-user-registration-action-not-triggered-after-manage-api-createuser/73006/9 "2021-11-19T20:46:14Z")

</div>

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.

Thanks.

---

<div class="post-metadata">

**Author:** ![r.cauquil](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/r.cauquil/32/12962_2.png) [@r.cauquil](https://community.auth0.com/u/r.cauquil)\
**Post date:** [November 22, 2021, 8:03am UTC](https://community.auth0.com/t/post-user-registration-action-not-triggered-after-manage-api-createuser/73006/10 "2021-11-22T08:03:34Z")

</div>

Thank you @rueben.tiow for the feedback.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [December 7, 2021, 8:03am UTC](https://community.auth0.com/t/post-user-registration-action-not-triggered-after-manage-api-createuser/73006/11 "2021-12-07T08:03:56Z")

</div>

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