# Post User Registration hook: app\_metadata undefined

**URL:** <https://community.auth0.com/t/post-user-registration-hook-app-metadata-undefined/24742>\
**Category:** Get Help\
**Tags:** hooks\
**Created:** [May 2, 2019, 12:46pm UTC](https://community.auth0.com/t/post-user-registration-hook-app-metadata-undefined/24742 "2019-05-02T12:46:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![apw](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/apw/32/12751_2.png) [@apw](https://community.auth0.com/u/apw)\
**Post date:** [May 2, 2019, 12:46pm UTC](https://community.auth0.com/t/post-user-registration-hook-app-metadata-undefined/24742/1 "2019-05-02T12:46:08Z")

</div>

Hi,

I’m creating a new user via the auth0 management api (auth0-python) and setting an app\_metadata key. I can see this key with a value in the auth0 dashboard.

However my hook raises “TypeError: Cannot read property ‘created\_by’ of undefined”," for code that references “user.app\_metadata.created\_by”

When I use the ‘Try’ tool on the hook page and set the key in the JSON, it works fine.

Any ideas? Thank you

---

<div class="post-metadata">

**Author:** ![apw](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/apw/32/12751_2.png) [@apw](https://community.auth0.com/u/apw)\
**Post date:** [May 14, 2019, 1:08pm UTC](https://community.auth0.com/t/post-user-registration-hook-app-metadata-undefined/24742/2 "2019-05-14T13:08:45Z")

</div>

This was confirmed as a bug by support

---

<div class="post-metadata">

**Author:** ![exgilenre](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/exgilenre/32/13207_2.png) [@exgilenre](https://community.auth0.com/u/exgilenre)\
**Post date:** [May 15, 2019, 7:36am UTC](https://community.auth0.com/t/post-user-registration-hook-app-metadata-undefined/24742/3 "2019-05-15T07:36:02Z")

</div>

Yes it was a bug.Thankfully [myccpay](https://www.myccpay.net/)

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [September 3, 2019, 8:27am UTC](https://community.auth0.com/t/post-user-registration-hook-app-metadata-undefined/24742/4 "2019-09-03T08:27:50Z")

</div>


