Self-registered user in self-hosted environment (with Zitadel idP) not being properly identified #1261

Open
opened 2025-11-20 05:27:05 -05:00 by saavagebueno · 12 comments
Owner

Originally created by @mikee2 on GitHub (Sep 18, 2024).

When a user register himself, the user entry in Netbird does not show his name but his Zitadel ID. This happen when you create a new organization in Zitadel and grant access to Netbird to that organization and then configure the netbird request to use that organization instead the main one.

I have added the urn:zitadel:iam:org:id:{organization id} in the scope of key PKCEAuthorizationFlow in management.json and now connecting users need to belong to this organization. But new users that register themselves are created inside that organization in Netbird not with their names, but with their Zitadel IDs (and there is no Name field that you can edit). The user's name is correct in Zitadel, by the way.

No other changes have been made to any configuration file. All is as the install script configured from the first time.

How can I solve this?.

Thanks in advance.

Originally created by @mikee2 on GitHub (Sep 18, 2024). When a user register himself, the user entry in Netbird does not show his name but his Zitadel ID. This happen when you create a new organization in Zitadel and grant access to Netbird to that organization and then configure the netbird request to use that organization instead the main one. I have added the urn:zitadel:iam:org:id:{organization id} in the scope of key PKCEAuthorizationFlow in management.json and now connecting users need to belong to this organization. But new users that register themselves are created inside that organization in Netbird not with their names, but with their Zitadel IDs (and there is no Name field that you can edit). The user's name is correct in Zitadel, by the way. No other changes have been made to any configuration file. All is as the install script configured from the first time. How can I solve this?. Thanks in advance.
saavagebueno added the management-serviceconfig-idpzitadelself-hosting labels 2025-11-20 05:27:05 -05:00
Author
Owner

@bcmmbaga commented on GitHub (Sep 19, 2024):

Hello @mikee2, To make sure users info appear correctly in Netbird, please follow the steps in the documentation Netbird Self-Hosted Identity Providers - Zitadel.

This will guide you through properly configuring Netbird to pull the correct user attributes, like their names and emails, from Zitadel

@bcmmbaga commented on GitHub (Sep 19, 2024): Hello @mikee2, To make sure users info appear correctly in Netbird, please follow the steps in the documentation [Netbird Self-Hosted Identity Providers - Zitadel](https://docs.netbird.io/selfhosted/identity-providers#zitadel). This will guide you through properly configuring Netbird to pull the correct user attributes, like their names and emails, from Zitadel
Author
Owner

@mikee2 commented on GitHub (Sep 19, 2024):

Hi Bethuel. Thanks for your reply.

As I used the provided script to install the system I assumed that integration was right and looked no further. After revision of the document the https://localhost:53000 redirect is missing in the dashboard app definition but what is written in text does not show in the screen capture just below so I do not know if it is necessary or not. My screen fits with the manual screenshot in this part. Grant type 'Device code' was also missing.

Anyway, if I remove the urn part and register a new user, then all work fine. The user is shown in netbird with his name, email, and all attributes as it should be. So the problem looks like it is not in the definition of the apps within the idP but with the fact that the netbird project is granted to this other organization. Perhaps granting needs something else that I have not done. I have only gone and granted the project to the org as it is written in the manuals.

Kind regards.
Miguel.

@mikee2 commented on GitHub (Sep 19, 2024): Hi Bethuel. Thanks for your reply. As I used the provided script to install the system I assumed that integration was right and looked no further. After revision of the document the https://localhost:53000 redirect is missing in the dashboard app definition but what is written in text does not show in the screen capture just below so I do not know if it is necessary or not. My screen fits with the manual screenshot in this part. Grant type 'Device code' was also missing. Anyway, if I remove the urn part and register a new user, then all work fine. The user is shown in netbird with his name, email, and all attributes as it should be. So the problem looks like it is not in the definition of the apps within the idP but with the fact that the netbird project is granted to this other organization. Perhaps granting needs something else that I have not done. I have only gone and granted the project to the org as it is written in the manuals. Kind regards. Miguel.
Author
Owner

@mikee2 commented on GitHub (Sep 26, 2024):

Any other ideas?

@mikee2 commented on GitHub (Sep 26, 2024): Any other ideas?
Author
Owner

@bcmmbaga commented on GitHub (Sep 26, 2024):

Just to clarify, the https://localhost:53000 redirect is required and is used when adding a new peer.

Did you deploy using Quick selfhosting or with https://docs.netbird.io/selfhosted/identity-providers#zitadel ?

@bcmmbaga commented on GitHub (Sep 26, 2024): Just to clarify, the `https://localhost:53000` redirect is required and is used when adding a new peer. Did you deploy using [Quick selfhosting](https://docs.netbird.io/selfhosted/selfhosted-quickstart) or with https://docs.netbird.io/selfhosted/identity-providers#zitadel ?
Author
Owner

@mikee2 commented on GitHub (Sep 29, 2024):

Thanks for the clarification. I have updated the config and added that redirect entry.

I made the deployment using the Quick selfhosting.

@mikee2 commented on GitHub (Sep 29, 2024): Thanks for the clarification. I have updated the config and added that redirect entry. I made the deployment using the Quick selfhosting.
Author
Owner

@ginsul commented on GitHub (Jan 1, 2025):

Hi,
It seems I have a similar problem: https://github.com/netbirdio/netbird/issues/3139.
Do you have an alternative solution?
Thank you.

@ginsul commented on GitHub (Jan 1, 2025): Hi, It seems I have a similar problem: https://github.com/netbirdio/netbird/issues/3139. Do you have an alternative solution? Thank you.
Author
Owner

@remipcomaite commented on GitHub (Jan 2, 2025):

Hi @mikee2 @ginsul,

I have proposed a PR that solves the problem.
This PR makes a change using Zitadel API V2.
In order to read information from other organizations, it will be necessary to add the service account as "User Manager" to the other organizations.

I hope this helps you.

https://github.com/netbirdio/netbird/pull/2994

@remipcomaite commented on GitHub (Jan 2, 2025): Hi @mikee2 @ginsul, I have proposed a PR that solves the problem. This PR makes a change using Zitadel API V2. In order to read information from other organizations, it will be necessary to add the service account as "User Manager" to the other organizations. I hope this helps you. https://github.com/netbirdio/netbird/pull/2994
Author
Owner

@ginsul commented on GitHub (Jan 15, 2025):

Hi @remipcomaite, @bcmmbaga,
I tried but still no luck. Do you mean using the NetBird service account?
And Should I follow the https://docs.netbird.io/selfhosted/selfhosted-quickstart or advanced?

image

Thank you

@ginsul commented on GitHub (Jan 15, 2025): Hi @remipcomaite, @bcmmbaga, I tried but still no luck. Do you mean using the NetBird service account? And Should I follow the https://docs.netbird.io/selfhosted/selfhosted-quickstart or advanced? ![image](https://github.com/user-attachments/assets/2c4df8de-707c-49e5-9d2b-1df7e285a925) Thank you
Author
Owner

@emielpopla commented on GitHub (Apr 23, 2025):

Hi @remipcomaite, @bcmmbaga, I tried but still no luck. Do you mean using the NetBird service account? And Should I follow the https://docs.netbird.io/selfhosted/selfhosted-quickstart or advanced?

image

Thank you

Did you figure this out? I am having the same issue. Adding the NetBird service account as Org User Manager to the other organisation did not work. I also used the quickstart aetup guide.

@emielpopla commented on GitHub (Apr 23, 2025): > Hi [@remipcomaite](https://github.com/remipcomaite), [@bcmmbaga](https://github.com/bcmmbaga), I tried but still no luck. Do you mean using the NetBird service account? And Should I follow the https://docs.netbird.io/selfhosted/selfhosted-quickstart or advanced? > > ![image](https://github.com/user-attachments/assets/2c4df8de-707c-49e5-9d2b-1df7e285a925) > > Thank you Did you figure this out? I am having the same issue. Adding the NetBird service account as Org User Manager to the other organisation did not work. I also used the quickstart aetup guide.
Author
Owner

@adsehgal commented on GitHub (May 10, 2025):

Also facing this, would like to isolate netbird into a different organization altogether but I am also only seeing the User ID in netbird when users from different orgs sign up

@adsehgal commented on GitHub (May 10, 2025): Also facing this, would like to isolate netbird into a different organization altogether but I am also only seeing the User ID in netbird when users from different orgs sign up
Author
Owner

@DanMitrea commented on GitHub (May 12, 2025):

Having the same problem. I even added the netbird service account Iam Owner of the instance but still same problem. Different Org, just the ID and no Display Name. Can you please fix or tell us what to do?

@DanMitrea commented on GitHub (May 12, 2025): Having the same problem. I even added the netbird service account Iam Owner of the instance but still same problem. Different Org, just the ID and no Display Name. Can you please fix or tell us what to do?
Author
Owner

@remipcomaite commented on GitHub (May 12, 2025):

@ginsul @emielpopla @adsehgal @DanMitrea
The problem stems from the fact that Netbird currently uses API v1, which isn't multi-organization.
I had proposed a PR that forced the use of API v2, but Netbird preferred that I make the use of API v2 optional for backward compatibility.
You can check out the code in the PR and build the management service if you wish.
I don't have time to modify the code at the moment.

PR #2994

@remipcomaite commented on GitHub (May 12, 2025): @ginsul @emielpopla @adsehgal @DanMitrea The problem stems from the fact that Netbird currently uses API v1, which isn't multi-organization. I had proposed a PR that forced the use of API v2, but Netbird preferred that I make the use of API v2 optional for backward compatibility. You can check out the code in the PR and build the management service if you wish. I don't have time to modify the code at the moment. PR #2994
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#1261