# How do I check if a user exists in a different connection, when in action script?

**URL:** <https://community.auth0.com/t/how-do-i-check-if-a-user-exists-in-a-different-connection-when-in-action-script/113897>\
**Category:** Get Help\
**Tags:** automatic-migration, user-management\
**Created:** [August 17, 2023, 7:27pm UTC](https://community.auth0.com/t/how-do-i-check-if-a-user-exists-in-a-different-connection-when-in-action-script/113897 "2023-08-17T19:27:40Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [August 18, 2023, 2:16am UTC](https://community.auth0.com/t/how-do-i-check-if-a-user-exists-in-a-different-connection-when-in-action-script/113897/2 "2023-08-18T02:16:07Z")

</div>

Hey there @auth0rocks welcome to the community (sweet username 🙂 )!

> [@auth0rocks](#):
>
> I want to check if a user with the currently processing email address exists in a different connection in the tenant, when in a post login action script,

This will involve using the Management API to [search for the user’s email](https://auth0.com/docs/api/management/v2/users-by-email/get-users-by-email) at which point I believe you’d have the information you need.

Here’s some info on how to use the Management API in Actions:

[https://community.auth0.com/t/how-can-i-use-the-management-api-in-actions/64947](https://community.auth0.com/t/how-can-i-use-the-management-api-in-actions/64947)

And on caching tokens in Actions:

[https://community.auth0.com/t/caching-management-api-access-tokens-in-login-action/95855](https://community.auth0.com/t/caching-management-api-access-tokens-in-login-action/95855)

Hope this helps!

---

_[View the full topic](https://community.auth0.com/t/how-do-i-check-if-a-user-exists-in-a-different-connection-when-in-action-script/113897)._
