# How to skip login script if user already migrated

**URL:** <https://community.auth0.com/t/how-to-skip-login-script-if-user-already-migrated/115608>\
**Category:** Get Help\
**Tags:** custom-database-connections, connections\
**Created:** [September 7, 2023, 12:41am UTC](https://community.auth0.com/t/how-to-skip-login-script-if-user-already-migrated/115608 "2023-09-07T00:41:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![andyql](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/andyql/32/75461_2.png) [@andyql](https://community.auth0.com/u/andyql)\
**Post date:** [September 7, 2023, 12:41am UTC](https://community.auth0.com/t/how-to-skip-login-script-if-user-already-migrated/115608/1 "2023-09-07T00:41:45Z")

</div>

hello, the migration is working, but the login script is executed everytime when the user tries to login. is there a way to skip the script if the user is already migrated to the database?

---

<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:** [September 11, 2023, 1:36pm UTC](https://community.auth0.com/t/how-to-skip-login-script-if-user-already-migrated/115608/3 "2023-09-11T13:36:00Z")

</div>

Hi @andyql,

Thanks for the question!

Have you configured the database setting “Import Users to Auth0” in the ON position?

---

<div class="post-metadata">

**Author:** ![andyql](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/andyql/32/75461_2.png) [@andyql](https://community.auth0.com/u/andyql)\
**Post date:** [September 12, 2023, 12:01am UTC](https://community.auth0.com/t/how-to-skip-login-script-if-user-already-migrated/115608/4 "2023-09-12T00:01:07Z")

</div>

hey @dan.woda , thx for the reply. this one was resolved. just a quick one on another one i’m working on atm, it seems that there is no way to separate actions for the applications in a tenant, is that correct? the current work around is to put conditions in the scripts for different apps, but it would be nicer to be able to assign them separatly to the apps.

---

<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:** [September 12, 2023, 1:38pm UTC](https://community.auth0.com/t/how-to-skip-login-script-if-user-already-migrated/115608/5 "2023-09-12T13:38:02Z")

</div>

@andyql,

Yes, you can use conditionals to create separate actions per application. There is no GUI for it.

---

<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:** [September 26, 2023, 1:38pm UTC](https://community.auth0.com/t/how-to-skip-login-script-if-user-already-migrated/115608/6 "2023-09-26T13:38:22Z")

</div>

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