# Get organization id from user login

**URL:** <https://community.auth0.com/t/get-organization-id-from-user-login/82750>\
**Category:** Get Help\
**Tags:** organizations, net-core, login, auth0\
**Created:** [May 2, 2022, 3:10pm UTC](https://community.auth0.com/t/get-organization-id-from-user-login/82750 "2022-05-02T15:10:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![a19daniellr](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/a19daniellr/32/37036_2.png) [@a19daniellr](https://community.auth0.com/u/a19daniellr)\
**Post date:** [May 2, 2022, 3:10pm UTC](https://community.auth0.com/t/get-organization-id-from-user-login/82750/1 "2022-05-02T15:10:00Z")

</div>

Hi !  
I´m trying to login a user and after login get the organization ID. Let me explain it:

1. I want to use a custom domain for my login.
2. When the user enter the email and password, if its correct then get the token.
3. In the token I want the roles, the permissions and the organizationID.

I want to do it without enter any type of organizationID in the code, and without let the user select an organization. My users can´t have one email in 2 or more differents organizations, user just can be in 1 organization.

I search info about this and I found that Auth0 need a context for get the organization claim, and I want to just with email and passwd get the organization of the user, how can I do that ?

Cheers ! ^^

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [May 2, 2022, 5:58pm UTC](https://community.auth0.com/t/get-organization-id-from-user-login/82750/4 "2022-05-02T17:58:09Z")

</div>

Hi @a19daniellr ,

Welcome to the Auth0 Community!

Could you please check if the solution in [this](https://community.auth0.com/t/how-to-get-org-id-as-part-of-access-token/79703) topic helps? Thanks!

---

<div class="post-metadata">

**Author:** ![a19daniellr](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/a19daniellr/32/37036_2.png) [@a19daniellr](https://community.auth0.com/u/a19daniellr)\
**Post date:** [May 2, 2022, 6:17pm UTC](https://community.auth0.com/t/get-organization-id-from-user-login/82750/5 "2022-05-02T18:17:27Z")

</div>

Hi lihua.zhang,  
Thanks for answer me!  
I tried that solution but I have to pass OrganizationID like a parameter in the URL request, for example:  
[https://domain/authorize?org\_id=abc123](https://domain/authorize?org_id=abc123)  
But I dont want that, I want to login user without passing any parameter for the organization and when the user log in, I can easly get a token with OrgID.  
I dont know if I explain me well, do I?

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [May 2, 2022, 6:42pm UTC](https://community.auth0.com/t/get-organization-id-from-user-login/82750/6 "2022-05-02T18:42:05Z")

</div>

Thank you for the details.

Right now, we can not get organization in a token without logging-in in the context of an organization.

Could you please check [this](https://community.auth0.com/t/support-replace-organization-prompt-screen-with-choose-organization-during-login/72552) feedback and click on Vote if it applies to your use case? Otherwise, please communicate directly to our product team using our [feedback page](https://auth0.com/feedback) and click on the Vote button. Thank you!

---

<div class="post-metadata">

**Author:** ![mmitjam](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mmitjam/32/40222_2.png) [@mmitjam](https://community.auth0.com/u/mmitjam)\
**Post date:** [September 24, 2022, 3:28pm UTC](https://community.auth0.com/t/get-organization-id-from-user-login/82750/7 "2022-09-24T15:28:20Z")

</div>

Hi @a19daniellr .

Were you able to find a solution or a reasonable workaround for this?

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [February 2, 2023, 9:03pm UTC](https://community.auth0.com/t/get-organization-id-from-user-login/82750/8 "2023-02-02T21:03:08Z")

</div>


