Is there a way to have multiple microsoft identity provider but just 1 button instead of x buttons

Hello, i have a selfhosted zitadel and my customer have own identity providers that they want to have included. but for the moment if i add their identity provider as external identity on the main page there is added a button for that provider. so i would have a lot of buttons there. is there a way to change that?
38 Replies
boblack_zocker
boblack_zockerOP3w ago
version: v2.58.6
Rajat
Rajat3w ago
Hi, I am not sure if this could be achieved, to be honest. ZItadel does not allow grouping/hiding IDP buttons dynamically. you can use the scope urn:zitadel:iam:org:idp:id:{idp_id} to redirected to the identity provider to authenticate. OR ELSE Another possible way I see is to set up different domains/subdomains for different customers and configure domain-specific login policies in Zitadel. xyz.yourapp.com → Only shows XYZs IdP abc.yourapp.com → Only shows ABCs IdP
boblack_zocker
boblack_zockerOP3w ago
Hi, i am not sure about the first one but the second option was on my mind too. but the problem there is that we have a mobile app with webview. its tricky to get a standard solution over there with subdomains. Can u send me a example of the scope that u said?
Rajat Singh
Rajat Singh3w ago
Hey @boblack_zocker Your idp triggers a request to Zitadel's authorize endpoint using the urn:zitadel:iam:org:idp:id:{idp_id} scope so the user will directly be redirected to the choosen identity provider to authenticate. I hope that helps!
Rajat
Rajat3w ago
ZITADEL Docs
ZITADEL supports the usage of scopes as way of requesting information from the IAM and also instruct ZITADEL to do certain operations.
boblack_zocker
boblack_zockerOP3w ago
isnt it possible to add external identities and by the email determine which external id to use? this would make sense to me and i have seen it before on other platforms is zitadel not capable of that?
Rajat
Rajat3w ago
Ah okay, I think you were looking for Domain Discovery
ZITADEL Docs
This guide should explain how domain discovery works and how to configure it in ZITADEL.
boblack_zocker
boblack_zockerOP3w ago
yes something like that how can i bring this to working? do the external identities have to be added in zitadel for this to work i have my external identity added and "domain discovery allowed" is enabled. but it does not redirect me to the custom login page
Rajat Singh
Rajat Singh3w ago
hi @boblack_zocker you can start reading here, and see if it works 🙂 https://zitadel.com/docs/guides/solution-scenarios/domain-discovery#organization
ZITADEL Docs
This guide should explain how domain discovery works and how to configure it in ZITADEL.
boblack_zocker
boblack_zockerOP2w ago
i created a second organization in my zitadel now and added the organization domain domain discovery is also turned on but if i try to log in with a email from that organization it does not redirect me to the organizations login page where i've added the external identity all users get redirected to zitadel.myzitadel.com if now somebody from OrgA tries to log in will he get redirected to OrgA.zitadel.myzitadel.com? is that the point of domain discovery? because currently this is not happening and i dont know if it should be like this or not
Rajat Singh
Rajat Singh2w ago
Hey @boblack_zocker I'll look into it tomorrow
boblack_zocker
boblack_zockerOP2w ago
hey @Rajat i figured out to redirect to the other organization. now another question. is there a way to get the orgid from the logged in user? because if i do calls to the managment api i now always need the org id so i search the right userbase
Rajat Singh
Rajat Singh2w ago
hi @boblack_zocker not sure wdym by the logged in user?. Where do you want to "GET" the org id You can use https://zitadel.com/docs/apis/resources/auth/auth-service-get-my-user
ZITADEL Docs
Returns the full user object of the authenticated user including the profile, email, phone, etc
boblack_zocker
boblack_zockerOP2w ago
in the backend i have the claimprincipal this user has all info from the jwt token provided in it i mean there or maybe another way to get a users orgid is this availeable in the grpc in c# ?
Rajat Singh
Rajat Singh2w ago
Yes! Just scroll right all the way
Rajat Singh
Rajat Singh2w ago
No description
Rajat Singh
Rajat Singh2w ago
uh oh my bad you needed grpc
boblack_zocker
boblack_zockerOP2w ago
i saw this but somehow the whole grpc is not in the docs
Rajat Singh
Rajat Singh2w ago
you are right, gimme few hours and I will get back to you with this 🙂
boblack_zocker
boblack_zockerOP2w ago
alright 👍 for the whole managment grpc i have this object in the library Zitadel.Management.V1.ManagementService.ManagementServiceClient but cant find the same for the authenticated user maybe this @Rajat Zitadel.Auth.V1.AuthService.AuthServiceClient ?
Rajat Singh
Rajat Singh2w ago
yes you are right GetMyUser(ctx context.Context, in *GetMyUserRequest, opts ...grpc.CallOption) (*GetMyUserResponse, error)
boblack_zocker
boblack_zockerOP2w ago
which object in the response gives me the orgid?
Rajat Singh
Rajat Singh2w ago
the "resourceOwner" object 🙂
boblack_zocker
boblack_zockerOP2w ago
can a user be in organizationA and organizationB listed in the Userbase?
Rajat
Rajat7d ago
hey @boblack_zocker what do you mean by "Userbase" here
boblack_zocker
boblack_zockerOP6d ago
Every organization has their own users Thats what i mean
Rajat
Rajat5d ago
hey @boblack_zocker thanks for clarification but users are unique across orgs, so you cannot list cross orgs users as such.
boblack_zocker
boblack_zockerOP5d ago
alright 👍
boblack_zocker
boblack_zockerOP4d ago
ZITADEL Docs
Returns a list of user grants that match the search queries. User grants are the roles users have for a specific project and organization.
boblack_zocker
boblack_zockerOP4d ago
i try this call with the header given on granted projects i get this error: {"Status(StatusCode="NotFound", Detail="membership not found (AUTHZ-cdgFk)")"} now the problem is on my testsystem this worked fine but on production i get now this error xD i have no clue what the problem could be
Rajat Singh
Rajat Singh4d ago
Can you please share your curl request with me?. Does the grant that you're trying to apply already exists before you are trying to apply it?. Thanks
boblack_zocker
boblack_zockerOP3d ago
well i use the grpc so i dont really have the curl i just found out if there are non existing user grants he throws an error thats kinda weird why wouldnt it just give a empty list back?
Rajat
Rajat3d ago
yes that is what I was thinking, you need to make a call to pre-created roles sadly, reason being is that our APIs are STILL WIP. And we are still working on our api response 🙂
boblack_zocker
boblack_zockerOP3d ago
WEIP? WIP* well the roles and everything is existing but no user was asigned to any role because its a newly created organization thats why it did not work
Rajat
Rajat3d ago
yes
boblack_zocker
boblack_zockerOP3d ago
Another question @Rajat 😅 . Is it possible to move existing users from OrganisationA to OrganisationB?
Rajat
Rajat3d ago
WIP == work in progress

Did you find this page helpful?