# Is there a way to know which App triggered a Get User action script call?

**URL:** <https://community.auth0.com/t/is-there-a-way-to-know-which-app-triggered-a-get-user-action-script-call/36233>\
**Category:** Get Help\
**Created:** [January 13, 2020, 2:58pm UTC](https://community.auth0.com/t/is-there-a-way-to-know-which-app-triggered-a-get-user-action-script-call/36233 "2020-01-13T14:58:32Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![JonHarvey](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jonharvey/32/13280_2.png) [@JonHarvey](https://community.auth0.com/u/JonHarvey)\
**Post date:** [January 13, 2020, 2:58pm UTC](https://community.auth0.com/t/is-there-a-way-to-know-which-app-triggered-a-get-user-action-script-call/36233/1 "2020-01-13T14:58:33Z")

</div>

Hi there,

We have a difficulty where we are attempting to bulk migrate from one legacy database (using the Management API POST /users) and lazily migrating from another using the custom database Login and Get User action scripts. Each of the databases has an associated web application. Is it possible to only have the Login and Get User scripts called for a particular App, or determine in the script which App triggered it to be called? Or is there a better approach that you might suggest for a scenario such as ours?

Thanks,  
Jon

---

<div class="post-metadata">

**Author:** ![colin.coutts](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/colin.coutts/32/17217_2.png) [@colin.coutts](https://community.auth0.com/u/colin.coutts)\
**Post date:** [January 15, 2020, 11:50pm UTC](https://community.auth0.com/t/is-there-a-way-to-know-which-app-triggered-a-get-user-action-script-call/36233/2 "2020-01-15T23:50:46Z")

</div>

Hi @JonHarvey thanks for reaching out!

Are you planning on having a number of applications connect to the db that you’re automatically importing users from? From what it sounds like if you only have one application enabled then those db scripts will only fire if a user is attempting to login through that enabled application.

It’s also worth noting that you could get further information from a [rule](https://auth0.com/docs/rules) which would fire during the login process, there you could get access to what application/connection was involved. I’m not sure if you’re looking to store this information or just have it handy for test purposes but that could be an option to explore.

Best Regards,  
Colin

---

<div class="post-metadata">

**Author:** ![JonHarvey](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jonharvey/32/13280_2.png) [@JonHarvey](https://community.auth0.com/u/JonHarvey)\
**Post date:** [January 16, 2020, 12:03am UTC](https://community.auth0.com/t/is-there-a-way-to-know-which-app-triggered-a-get-user-action-script-call/36233/3 "2020-01-16T00:03:11Z")

</div>

Thanks for your response @colin.coutts.

We are planning on having two Web applications connect to the database initially. We are essentially combining two applications with two databases into two applications with one Auth0 database. But the way that we’re achieving that mean we’d like to be aware of which application is calling the Get User script. Can we have a rule run before the Get User script is called and enhance the arguments (or context) passed to the Get User script?

Thanks,  
Jon

---

<div class="post-metadata">

**Author:** ![rashid779939](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rashid779939/32/27027_2.png) [@rashid779939](https://community.auth0.com/u/rashid779939)\
**Post date:** [January 16, 2020, 5:32am UTC](https://community.auth0.com/t/is-there-a-way-to-know-which-app-triggered-a-get-user-action-script-call/36233/4 "2020-01-16T05:32:57Z")

</div>

you can get application\_id using this field **config.clientID** on login page. On basis of application/client\_id you can differentiate the request.

---

<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:** [January 16, 2020, 1:23pm UTC](https://community.auth0.com/t/is-there-a-way-to-know-which-app-triggered-a-get-user-action-script-call/36233/5 "2020-01-16T13:23:41Z")

</div>

Thanks a lot for sharing that knowledge here @rashid779939!

---

<div class="post-metadata">

**Author:** ![JonHarvey](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jonharvey/32/13280_2.png) [@JonHarvey](https://community.auth0.com/u/JonHarvey)\
**Post date:** [January 17, 2020, 1:02am UTC](https://community.auth0.com/t/is-there-a-way-to-know-which-app-triggered-a-get-user-action-script-call/36233/6 "2020-01-17T01:02:20Z")

</div>

@rashid779939, thanks for the suggestion but you mentioned the login page, whereas I was referring to the Get User script, which can be called upon Forgot Password or the Sign Up (directly or via the Management API). I did try using the property config.clientID in the Get User script but it did not work (config is undefined). Using configuration.clientID also didn’t work.

Am I missing something here?

---

<div class="post-metadata">

**Author:** ![rashid779939](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rashid779939/32/27027_2.png) [@rashid779939](https://community.auth0.com/u/rashid779939)\
**Post date:** [January 19, 2020, 7:34am UTC](https://community.auth0.com/t/is-there-a-way-to-know-which-app-triggered-a-get-user-action-script-call/36233/7 "2020-01-19T07:34:45Z")

</div>

If you go through in login page, you will see the whole process. On that page you can check application ID and continue to further flow as required. Because you go to get user script after login page flow completed.

---

<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:** [January 20, 2020, 9:38am UTC](https://community.auth0.com/t/is-there-a-way-to-know-which-app-triggered-a-get-user-action-script-call/36233/8 "2020-01-20T09:38:17Z")

</div>

Let us know if you have any other questions!

---

<div class="post-metadata">

**Author:** ![anvar.kannamparambil](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/anvar.kannamparambil/32/12751_2.png) [@anvar.kannamparambil](https://community.auth0.com/u/anvar.kannamparambil)\
**Post date:** [October 13, 2020, 7:39am UTC](https://community.auth0.com/t/is-there-a-way-to-know-which-app-triggered-a-get-user-action-script-call/36233/9 "2020-10-13T07:39:20Z")

</div>

Could you solve the issue?
