[GH-ISSUE #5337] IdP JWT allow groups lock out local accounts #11273

Closed
opened 2026-08-05 01:29:08 -04:00 by saavagebueno · 5 comments
Owner

Originally created by @Raylands on GitHub (Feb 15, 2026).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/5337

Describe the problem

When you set up an IdP and restrict logins to only specific groups, your local owner account gets locked out.
You either need an IdP User with admin privileges or edit the sqlite database store.db to get back in.

BEGIN; UPDATE accounts SET settings_jwt_groups_enabled = 0 WHERE id='<ID_OF_THE_ROW>'; COMMIT;

To Reproduce

  1. Setup an IdP
  2. Enable JWT group sync
  3. Setup JWT claims
  4. Setup JWT allow groups
  5. Login with you local account

Expected behavior

The local user can login since the JWT allow groups check should only run for IdPs (which should also be a per IdP setting to configure)

Are you using NetBird Cloud?

Latest self-hosted version

Management
v0.65.1
Dashboard
v2.32.0

Originally created by @Raylands on GitHub (Feb 15, 2026). Original GitHub issue: https://github.com/netbirdio/netbird/issues/5337 **Describe the problem** When you set up an IdP and restrict logins to only specific groups, your local owner account gets locked out. You either need an IdP User with admin privileges or edit the sqlite database `store.db` to get back in. `BEGIN; UPDATE accounts SET settings_jwt_groups_enabled = 0 WHERE id='<ID_OF_THE_ROW>'; COMMIT;` **To Reproduce** 1. Setup an IdP 2. Enable JWT group sync 3. Setup JWT claims 4. Setup JWT allow groups 5. Login with you local account **Expected behavior** The local user can login since the JWT allow groups check should only run for IdPs (which should also be a per IdP setting to configure) **Are you using NetBird Cloud?** Latest self-hosted version Management v0.65.1 Dashboard v2.32.0
saavagebueno added the triage-needed label 2026-08-05 01:29:08 -04:00
Author
Owner

@PeterR-SK commented on GitHub (Feb 20, 2026):

I've also experienced this wile setting up new Netbird instance. It is not even required to set external IdP to reproduce it. Local user gets locked out instantly. Even if you create local group first and add the user into it.

When the owner user is created in Dex IdP, does it have any group assigned in its profile? If so, should the group be presented also in the UI so one would be able to include the group JWT allow groups and thus prevent local owner user lockout?

<!-- gh-comment-id:3936716963 --> @PeterR-SK commented on GitHub (Feb 20, 2026): I've also experienced this wile setting up new Netbird instance. It is not even required to set external IdP to reproduce it. Local user gets locked out instantly. Even if you create local group first and add the user into it. When the owner user is created in Dex IdP, does it have any group assigned in its profile? If so, should the group be presented also in the UI so one would be able to include the group JWT allow groups and thus prevent local owner user lockout?
Author
Owner

@Raylands commented on GitHub (Feb 20, 2026):

Adding a group to the local user doesn't work. I tried assigning it to an Azure IdP group, but it only let me in via Azure but not the local one.

<!-- gh-comment-id:3936857486 --> @Raylands commented on GitHub (Feb 20, 2026): Adding a group to the local user doesn't work. I tried assigning it to an Azure IdP group, but it only let me in via Azure but not the local one.
Author
Owner

@sjansen1 commented on GitHub (Feb 22, 2026):

I have found the same issue after creating a new test install with Entra ID, my local owner user cant login after settings a login group in the group settings. Another issue that bothers me is the missing mfa for local user, i think most people with external IDP use the local user as a backup admin to maintan the IDP settings if something goes wrong or api keys expire. Maybe its better to avoid the internal idp and and set OIDC via docker compose. But i never tried that and i dont know if this is completly remove internal users. Atleast you can maintain OIDC settings if login stopps working.

<!-- gh-comment-id:3941064322 --> @sjansen1 commented on GitHub (Feb 22, 2026): I have found the same issue after creating a new test install with Entra ID, my local owner user cant login after settings a login group in the group settings. Another issue that bothers me is the missing mfa for local user, i think most people with external IDP use the local user as a backup admin to maintan the IDP settings if something goes wrong or api keys expire. Maybe its better to avoid the internal idp and and set OIDC via docker compose. But i never tried that and i dont know if this is completly remove internal users. Atleast you can maintain OIDC settings if login stopps working.
Author
Owner

@olaszfiuservice commented on GitHub (Apr 14, 2026):

I have the same problem. I added an external KeyCloak IDP and filtered users on some groups. Since then local user (with Owner role) cannot login.

<!-- gh-comment-id:4245202800 --> @olaszfiuservice commented on GitHub (Apr 14, 2026): I have the same problem. I added an external KeyCloak IDP and filtered users on some groups. Since then local user (with Owner role) cannot login.
Author
Owner

@kaysond commented on GitHub (May 21, 2026):

I just set up netbird and ran into this. Thanks to OP for sharing the fix.

If you have the dashboard restricted, wouldn't this mean you can't ever get back into it? That seems... bad

<!-- gh-comment-id:4514319218 --> @kaysond commented on GitHub (May 21, 2026): I just set up netbird and ran into this. Thanks to OP for sharing the fix. If you have the dashboard restricted, wouldn't this mean you can't ever get back into it? That seems... bad
Sign in to join this conversation.
No Label triage-needed
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#11273