Auto assign user role (user|admin|owner) based on idp groups at login stage. #947

Open
opened 2025-11-20 05:20:23 -05:00 by saavagebueno · 3 comments
Owner

Originally created by @marcportabellaclotet-mt on GitHub (May 31, 2024).

Is your feature request related to a problem? Please describe.

When a user logs in via an identity provider (IdP), they are assigned the "user" role by default. Is it possible to use the JWT token information (such as groups) to perform role mapping?

Describe the solution you'd like
I would like that users which are part of an idp group, for example "netbird admins" are automatically assigned the "admin" role in Netbird

Describe alternatives you've considered
I can achieve this using api calls to netbird, but a native integration would be appreciated.

Originally created by @marcportabellaclotet-mt on GitHub (May 31, 2024). **Is your feature request related to a problem? Please describe.** When a user logs in via an identity provider (IdP), they are assigned the "user" role by default. Is it possible to use the JWT token information (such as groups) to perform role mapping? **Describe the solution you'd like** I would like that users which are part of an idp group, for example "netbird admins" are automatically assigned the "admin" role in Netbird **Describe alternatives you've considered** I can achieve this using api calls to netbird, but a native integration would be appreciated.
saavagebueno added the feature-request label 2025-11-20 05:20:23 -05:00
Author
Owner

@pappz commented on GitHub (Jun 4, 2024):

Hello @marcportabellaclotet-mt
Thank you for your feature request!
Right now we don’t sync the user role. The only way to control user role is through the NetBird dashboard. We will consider what we can do.

@pappz commented on GitHub (Jun 4, 2024): Hello @marcportabellaclotet-mt Thank you for your feature request! Right now we don’t sync the user role. The only way to control user role is through the NetBird dashboard. We will consider what we can do.
Author
Owner

@marcportabellaclotet-mt commented on GitHub (Dec 2, 2024):

Is there any plan to support this feature? Thanks!

@marcportabellaclotet-mt commented on GitHub (Dec 2, 2024): Is there any plan to support this feature? Thanks!
Author
Owner

@MichalNemec commented on GitHub (Jun 9, 2025):

there is now this:

Image

but it seems like its not working? in our usecase client_roles has ["string", "string"] but no group was created.

EDIT: oops, user didnt have a client role, now it works.

@MichalNemec commented on GitHub (Jun 9, 2025): there is now this: <img width="515" alt="Image" src="https://github.com/user-attachments/assets/8214df09-1292-47b9-95cc-68e0051ddc2f" /> but it seems like its not working? in our usecase client_roles has ["string", "string"] but no group was created. EDIT: oops, user didnt have a client role, now it works.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#947