# Using onExecutePostUserRegistration , is possible to get globalClientId?

**URL:** <https://community.auth0.com/t/using-onexecutepostuserregistration-is-possible-to-get-globalclientid/85327>\
**Category:** Get Help\
**Tags:** auth0-flows, actions, auth0\
**Created:** [June 17, 2022, 7:00pm UTC](https://community.auth0.com/t/using-onexecutepostuserregistration-is-possible-to-get-globalclientid/85327 "2022-06-17T19:00:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![freddymhs](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/freddymhs/32/37682_2.png) [@freddymhs](https://community.auth0.com/u/freddymhs)\
**Post date:** [June 17, 2022, 7:00pm UTC](https://community.auth0.com/t/using-onexecutepostuserregistration-is-possible-to-get-globalclientid/85327/1 "2022-06-17T19:00:19Z")

</div>

Hi community

I am testing (onExecutePostUserRegistration) of “flow” actions, but i am using static data for the client id.

my question: is it possible to get the “global client id” inside this “action”?

my code is like this:

> const options = {  
> method: “POST”,  
> url: “[https://x.auth0.com/dbconnections/change\_password](https://x.auth0.com/dbconnections/change_password)”,  
> headers: { “content-type”: “application/json” },  
> data: {  
> client\_id:“STATIC-CLIENT-ID”,  
> email:userEmail,  
> connection:“Username-Password-Authentication”,  
> },  
> };

I would like something like this: {{application.clientId}} \<3

Greetings !

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [June 24, 2022, 6:26pm UTC](https://community.auth0.com/t/using-onexecutepostuserregistration-is-possible-to-get-globalclientid/85327/3 "2022-06-24T18:26:15Z")

</div>

Hi @freddymhs,

Why are you wanting to use the global client ID for this? Do you mean the client ID of the application the user has registered with?

---

<div class="post-metadata">

**Author:** ![freddymhs](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/freddymhs/32/37682_2.png) [@freddymhs](https://community.auth0.com/u/freddymhs)\
**Post date:** [June 28, 2022, 3:25pm UTC](https://community.auth0.com/t/using-onexecutepostuserregistration-is-possible-to-get-globalclientid/85327/4 "2022-06-28T15:25:52Z")

</div>

I understand that it should not be linked to the user’s profile, the “client ID” is the environment of auth0 , eg: “local” , “production”.

![image](https://global.discourse-cdn.com/auth0/original/3X/1/1/11391a8cc288340ef6d972e526b7e2375a465bf3.png)

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [June 28, 2022, 4:34pm UTC](https://community.auth0.com/t/using-onexecutepostuserregistration-is-possible-to-get-globalclientid/85327/5 "2022-06-28T16:34:27Z")

</div>

The purpose of the client ID for this endpoint is so that the email template knows from which client the request was triggered. Why not use `event.client.client_id`? This would ensure the user gets an email that is relevant to the application they are authenticating with.

Otherwise you might want to chose to omit the client ID entirely. I’m not sure what a global client ID would do, and if I’m missing something please let me know.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [May 11, 2023, 12:58pm UTC](https://community.auth0.com/t/using-onexecutepostuserregistration-is-possible-to-get-globalclientid/85327/6 "2023-05-11T12:58:20Z")

</div>


