# How to determine the identifier used to log in?

**URL:** <https://community.auth0.com/t/how-to-determine-the-identifier-used-to-log-in/182054>\
**Category:** Get Help\
**Tags:** new-universal-login-experience, login-experience\
**Created:** [February 12, 2025, 3:14pm UTC](https://community.auth0.com/t/how-to-determine-the-identifier-used-to-log-in/182054 "2025-02-12T15:14:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![artem\_romanov](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/artem_romanov/32/60490_2.png) [@artem\_romanov](https://community.auth0.com/u/artem_romanov)\
**Post date:** [February 12, 2025, 3:14pm UTC](https://community.auth0.com/t/how-to-determine-the-identifier-used-to-log-in/182054/1 "2025-02-12T15:14:25Z")

</div>

**Hello!**  
We are using a database connection and allowing users to log in with either an email or a phone number. We want to implement login logic that depends on which identifier was used—phone number or email.

Would you mind helping us find a way to determine which identifier was used to log in?

P.S. I thought this information would be contained in the event object in the post-login trigger, but I couldn’t find it.

---

<div class="post-metadata">

**Author:** ![gerald.czifra](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/gerald.czifra/32/75301_2.png) [@gerald.czifra](https://community.auth0.com/u/gerald.czifra)\
**Post date:** [February 12, 2025, 10:04pm UTC](https://community.auth0.com/t/how-to-determine-the-identifier-used-to-log-in/182054/3 "2025-02-12T22:04:50Z")

</div>

Hi @artem_romanov

Welcome to the Auth0 Community!

I’ve tested a user’s login with both username and email, upon checking the Management API’s [Get User by ID](https://auth0.com/docs/api/management/v2/users/get-logs-by-user), I’ve found that `Identifier` will return the type an value used on each login, which is found under the `details` object.

You should be able to invoke the Management API within Actions; for additional steps on how to perform this, please take a look at our [Knowledge Article](https://community.auth0.com/t/using-the-management-api-in-actions/64947).

Let me know if this is what you were looking for.

Have a great one!  
Gerald

---

<div class="post-metadata">

**Author:** ![artem\_romanov](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/artem_romanov/32/60490_2.png) [@artem\_romanov](https://community.auth0.com/u/artem_romanov)\
**Post date:** [February 17, 2025, 11:06am UTC](https://community.auth0.com/t/how-to-determine-the-identifier-used-to-log-in/182054/4 "2025-02-17T11:06:46Z")

</div>

Thanks for your reply!  
If I get right, your suggestion is to get log messages via Management API which you have shared with me, and check details.identifier field.  
The API you provided returning the list of log records with the different types. But details.identifier exists only in logs with the ‘s’ type. Please correct me if I am wrong. Thanks for your suggestion, but we don’t want base our business logic on log records analysis.  
If would be perfect to have login type info somewhere in the event object.

---

<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:** [April 15, 2025, 3:09pm UTC](https://community.auth0.com/t/how-to-determine-the-identifier-used-to-log-in/182054/5 "2025-04-15T15:09:00Z")

</div>

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