wlinnaW
ZITADELโ€ข2y agoโ€ข
4 replies
wlinna

Zitadel forgets `urn:zitadel:iam:org:id:{orgId}` scope if you insert domain suffix of another org

Problem: Zitadel forgets the added organization scope of the
authorize
request and reverts to the default organization, and it's very easy to reproduce accidentally:

0. Enable
Add organization domain as suffix to loginnames
in instance settings.
1. Have two orgs A and B. Set A to default. Create a user to A. Let's call it
alice@myemail.com@A.localhost

2. Create projects and applications for both organizations (I use PKCE)
3. Set your applications to add
urn:zitadel:iam:org:id:{orgIdOfB}
to the scopes in authorization url.
4. Sign in. You will be greeted with
Enter your login data. The user must be member of the B organization.

5. Click
Other User

6. Input
alice@myemail.com@A.localhost
. Click next
7. Zitadel will take you to the "Registration options" screen (instead of the login by password screen as one might expect).
At this point if there are branding differences, you might notice the change already
8. Click the back-arrow of Zitadel. You will be greeted with
Enter your login data. The user must be member of the A organization.

9. Now input
alice@myemail.com@A.localhost
again and click
Next
.
10. Enter the password. If the password is correct, you will sign in successfully

How can I avoid this behaviour?

I'm using Zitadel v2.58.2
Was this page helpful?