# Lazy Migration but with different API URL

**URL:** <https://community.auth0.com/t/lazy-migration-but-with-different-api-url/187748>\
**Category:** Get Help\
**Tags:** user-import-export, user-management\
**Created:** [June 9, 2025, 3:45am UTC](https://community.auth0.com/t/lazy-migration-but-with-different-api-url/187748 "2025-06-09T03:45:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![denmark.daya](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/denmark.daya/32/60297_2.png) [@denmark.daya](https://community.auth0.com/u/denmark.daya)\
**Post date:** [June 9, 2025, 3:45am UTC](https://community.auth0.com/t/lazy-migration-but-with-different-api-url/187748/1 "2025-06-09T03:45:42Z")

</div>

Hello,

Is there a way that our custom database user migration script can identify which application it has been called and we switch API URL based on stored application metadata?

The idea is we have a different source of user migration APIs that is using a single login/custom database migration script.

What could be the best approach for this solution?

Appreciate the help.

---

<div class="post-metadata">

**Author:** ![vlad.murarasu](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vlad.murarasu/32/72793_2.png) [@vlad.murarasu](https://community.auth0.com/u/vlad.murarasu)\
**Post date:** [June 9, 2025, 1:11pm UTC](https://community.auth0.com/t/lazy-migration-but-with-different-api-url/187748/3 "2025-06-09T13:11:54Z")

</div>

Hi @denmark.daya,

To better understand the question, I need to ask if you have two databases with two different applications and want one database to be associated with one application.

Have a good one,  
Vlad

---

<div class="post-metadata">

**Author:** ![denmark.daya](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/denmark.daya/32/60297_2.png) [@denmark.daya](https://community.auth0.com/u/denmark.daya)\
**Post date:** [June 9, 2025, 11:28pm UTC](https://community.auth0.com/t/lazy-migration-but-with-different-api-url/187748/4 "2025-06-09T23:28:55Z")

</div>

Hi Vlad,

Apologies for the late response, but these are multiple Auth0 applications that would be using a single Auth0 database. as we are aiming to migrate multiple third-party user sources to a single Auth0 database.

Is there a way to detect which Auth0 application used the login script so we can perform a switch for the API URL?

Appreciate the help.

---

<div class="post-metadata">

**Author:** ![vlad.murarasu](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vlad.murarasu/32/72793_2.png) [@vlad.murarasu](https://community.auth0.com/u/vlad.murarasu)\
**Post date:** [June 10, 2025, 2:33pm UTC](https://community.auth0.com/t/lazy-migration-but-with-different-api-url/187748/5 "2025-06-10T14:33:17Z")

</div>

Hi again @denmark.daya,

Unfortunately, one Auth0 database connection cannot simultaneously do lazy migrations from two sources.

But since you specified that you have two different apps with two distinct pools of users, I suggest having two database connections for each database and doing the lazy migration separately. After all accounts have been migrated, you can export users from one database to another if unifying your databases is the end goal.

If you have any other questions, feel free to reach out.

Have a good one,  
Vlad

---

<div class="post-metadata">

**Author:** ![denmark.daya](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/denmark.daya/32/60297_2.png) [@denmark.daya](https://community.auth0.com/u/denmark.daya)\
**Post date:** [June 10, 2025, 10:27pm UTC](https://community.auth0.com/t/lazy-migration-but-with-different-api-url/187748/6 "2025-06-10T22:27:41Z")

</div>

Thanks for the clarification.

---

<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:** [June 24, 2025, 10:27pm UTC](https://community.auth0.com/t/lazy-migration-but-with-different-api-url/187748/7 "2025-06-24T22:27:45Z")

</div>

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