# Pre-user-registration, when is optional event.client not defined?

**URL:** <https://community.auth0.com/t/pre-user-registration-when-is-optional-event-client-not-defined/92870>\
**Category:** Get Help\
**Created:** [October 21, 2022, 9:17am UTC](https://community.auth0.com/t/pre-user-registration-when-is-optional-event-client-not-defined/92870 "2022-10-21T09:17:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![julian2](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/julian2/32/33548_2.png) [@julian2](https://community.auth0.com/u/julian2)\
**Post date:** [October 21, 2022, 9:17am UTC](https://community.auth0.com/t/pre-user-registration-when-is-optional-event-client-not-defined/92870/1 "2022-10-21T09:17:51Z")

</div>

Hi,

depending on the client initiating a new user’s registration, we want to execute some logic in the pre-user-registration flow.  
However the docs say that `event.client` is optional.  
In what cases is event.client not defined? I could not find any documentation about this. I thought every registration must be initiated by a client?

Another question popped up:  
Is it possible to access the registering client in a post-user-registration action? My current approach would be to save the client in a pre-user-registration action in the user’s metadata and then try to access it in a post-user-registration-action.

Thanks!

---

<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:** [October 25, 2022, 3:48pm UTC](https://community.auth0.com/t/pre-user-registration-when-is-optional-event-client-not-defined/92870/3 "2022-10-25T15:48:33Z")

</div>

Hi @julian2,

Welcome to the Auth0 Community!

I understand you have questions about using the Pre-User Registration Action.

> [@julian2](#):
>
> In what cases is event.client not defined? I could not find any documentation about this. I thought every registration must be initiated by a client?

Firstly, the `event.client` object is always defined in a Pre-User Registration Action. However, I should emphasize that users can be created in a few ways, namely:

1. The [Authentication API Signup Endpoint](https://auth0.com/docs/api/authentication#signup)
2. The Management API [Create a User Endpoint](https://auth0.com/docs/api/management/v2#!/Users/post_users)
3. [Auth0 Dashboard User Management](https://manage.auth0.com/#/users) Interface

Among these methods, only the Authentication API Signup endpoint requires the `client_id` when creating users.

In the Management API and Auth0 Dashboard, there is no requirement for specifying the `client_id`, therefore this will populate with default values configured on your tenant.

Specifically, the Management API will use the default M2M application named **API Explorer Application** , and the Auth0 Dashboard user management interface will use the global application on your tenant named “All Applications”. Your global application client id can be found on your [Auth0 Dashboard Settings \> Advanced \> Global Client Information](https://manage.auth0.com/#/tenant/advanced).

I hope this answers your questions.

Please let me know if there’s anything else I can do to help.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![julian2](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/julian2/32/33548_2.png) [@julian2](https://community.auth0.com/u/julian2)\
**Post date:** [October 27, 2022, 9:09am UTC](https://community.auth0.com/t/pre-user-registration-when-is-optional-event-client-not-defined/92870/4 "2022-10-27T09:09:14Z")

</div>

Hi Rueben,

you answered my question perfectly, thank you for the detailed explanation!

Best regards,

Julian

---

<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:** [November 10, 2022, 9:09am UTC](https://community.auth0.com/t/pre-user-registration-when-is-optional-event-client-not-defined/92870/5 "2022-11-10T09:09:56Z")

</div>

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