# Auth0 Federated User Claims

**URL:** <https://community.auth0.com/t/auth0-federated-user-claims/92093>\
**Category:** Get Help\
**Tags:** jwt, login\
**Created:** [October 10, 2022, 4:16pm UTC](https://community.auth0.com/t/auth0-federated-user-claims/92093 "2022-10-10T16:16:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![matt.scachette](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/matt.scachette/32/33197_2.png) [@matt.scachette](https://community.auth0.com/u/matt.scachette)\
**Post date:** [October 10, 2022, 4:16pm UTC](https://community.auth0.com/t/auth0-federated-user-claims/92093/1 "2022-10-10T16:16:18Z")

</div>

Hello -

We have configured our Auth0 tenant to use an Enterprise connection to Microsoft Azure AD based on the Identifier First flow for some users (based on email domain) and other users are using Auth0 local accounts. The steps we used to establish Azure AD enterprise connection are outlined at [Connect Your Native App to Microsoft Azure Active Directory Using Resource Owner Flow](https://auth0.com/docs/authenticate/identity-providers/enterprise-identity-providers/azure-active-directory-native).

Consider the following two flows:

- Secure Resource Request =\> Auth0 =\> “[Enterprise.com](http://Enterprise.com)” id first recognized =\> Azure AD =\> LOGIN =\> Auth0 w/ claims =\> Secure resource

vs

- Secure Resource Request =\> Auth0 =\> “[abc123.com](http://abc123.com)” (no id first flow =\> Auth0 Local Account LOGIN =\> Secure resource

How can our secure resource application know which flow the user took? We cannot locate any claim data to hint that the user logged into an “enterprise connection”. e.g. No claims exist that the user logged in via Azure AD.

---

<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:** [October 10, 2022, 8:24pm UTC](https://community.auth0.com/t/auth0-federated-user-claims/92093/4 "2022-10-10T20:24:06Z")

</div>

Hey there @matt.scachette!

> [@matt.scachette](#):
>
> How can our secure resource application know which flow the user took? We cannot locate any claim data to hint that the user logged into an “enterprise connection”. e.g. No claims exist that the user logged in via Azure AD.

My initial reaction is to take a look at the `sub` claim - If a user has federated through Azure AD this would result in a `sub` claim like `waad|user_id` whereas if Auth0 it would be `auth0|user_id`.

Alternatively, you could certainly hook into an Action. For example, in a Post Login Action you have available to you the [event](https://auth0.com/docs/customize/actions/flows-and-triggers/login-flow/event-object) object which contains an `event.connection.strategy` where this information will also be available.

Let me know if I didn’t understand your question correctly - Hope this helps!

---

<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:** [December 22, 2022, 11:43pm UTC](https://community.auth0.com/t/auth0-federated-user-claims/92093/5 "2022-12-22T23:43:58Z")

</div>

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