---
title: How to route the user to the right organization?
description: This article describes how to route a user to log in to a specific organization
---

[Skip to content](https://help.zitadel.com/how-to-route-the-user-to-the-right-organization#main-content)

[![zitadel-logo\_text-dark (1)](https://help.zitadel.com/hs-fs/hubfs/zitadel-logo_text-dark%20(1).png?width=210&height=60&name=zitadel-logo_text-dark%20(1).png)](https://help.zitadel.com/?hsLang=en)

Open main navigation

Close main navigation

- [Documentation](https://zitadel.com/docs)

[Documentation](https://zitadel.com/docs)

 How can we help you?

- There are no suggestions because the search field is empty.

1. [ZITADEL Knowledge Base](https://help.zitadel.com/?hsLang=en)
2. [Authentication & Login](https://help.zitadel.com/authentication-login?hsLang=en)

September 12, 2025

# How to route the user to the right organization?

## In a classic B2B scenario, users have to be routed to the right organization to complete the login flow

There are different ways to route the user to its organization to login:

**Automatically (based on login name):**

- **If the user already exists**, Zitadel will redirect the user to the right organization to log in. ZITADEL selects your users organization as soon as they enter their login name.

If the user tries to log in using their email, and that email exists in more than 1 organization, an error message will be displayed. In this case, the user will have to use the username to log in.

- **If the user does not exist**, for example, for external IDP users, you can enable [Domain Discovery,](https://zitadel.com/docs/guides/manage/console/default-settings#login-behavior-and-access) which will allow the user to log in with it's IDP:

1. 1. 1. Enable domain discovery for that organization: 
                     1. Organization Settings -\> 
                        
                        Login Behavior and Security
            2. Add the domain as a verified domain for that organization: 
                     1. Organization Settings -\> 
                        
                        Verified domains

**Force organization membership:**

- You can pass the following scope in the auth request to force login to an specific organization: 
    - `urn:zitadel:iam:org:id:<ORG_ID>`

Reference:

- [Zitadel Scopes](https://zitadel.com/docs/apis/openidoauth/scopes#reserved-scopes)
- [Domain discovery](https://zitadel.com/docs/guides/solution-scenarios/domain-discovery)

- [Getting Started](https://help.zitadel.com/getting-started?hsLang=en)
- [User Management](https://help.zitadel.com/user-management?hsLang=en)
- [Authentication & Login](https://help.zitadel.com/authentication-login?hsLang=en)
- [Security & Compliance](https://help.zitadel.com/security-compliance?hsLang=en)
- [Troubleshooting](https://help.zitadel.com/troubleshooting?hsLang=en)
- [Account & Subscription](https://help.zitadel.com/account-subscription?hsLang=en#main-content)

    - [Support](https://help.zitadel.com/account-subscription?hsLang=en#support)
    - [Billing (Pro)](https://help.zitadel.com/account-subscription?hsLang=en#billing-pro)
    - [Billing (Enterprise)](https://help.zitadel.com/account-subscription?hsLang=en#billing-enterprise)
    - [Zitadel Cloud Account](https://help.zitadel.com/account-subscription?hsLang=en#zitadel-cloud-account)
    - [Service Description](https://help.zitadel.com/account-subscription?hsLang=en#service-description)
- [Default Settings](https://help.zitadel.com/default-settings?hsLang=en#main-content)

    - [Web Keys](https://help.zitadel.com/default-settings?hsLang=en#web-keys)
- [Self-Hosting](https://help.zitadel.com/self-hosting?hsLang=en)

[![zitadel-logo\_text-dark](https://help.zitadel.com/hs-fs/hubfs/zitadel-logo_text-dark.png?width=210&height=60&name=zitadel-logo_text-dark.png "zitadel-logo_text-dark")](http://zitadel.com)

1 Embarcadero Center, Suite 1200  
San Francisco, CA 94111

<https://github.com/zitadel/zitadel> <https://x.com/zitadel> <https://www.facebook.com/zitadel.social> <https://www.linkedin.com/company/zitadel/> <https://zitadel.com/chat> <https://www.youtube.com/@zitadel>

Copyright © 2025 All rights reserved.