[GH-ISSUE #5513] SSO token expiry leaves client in stale "Connected" state — requires manual disconnect/reconnect to re-authenticate #10686

Open
opened 2026-08-05 01:26:54 -04:00 by saavagebueno · 2 comments
Owner

Originally created by @JonathanManass on GitHub (Mar 5, 2026).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/5513

Describe the problem

When the SSO session (Azure AD OpenID Connect) expires, the NetBird client remains in a "Connected" state (Management: Connected, Signal: Connected) but peer connectivity silently degrades. Some peers show as "Connecting" indefinitely and traffic no longer flows to them, while the client never triggers a re-authentication prompt.

The only workaround is to manually run netbird down followed by netbird up, which triggers a new SSO login flow and restores full connectivity.

This makes the client unreliable for long-running machines (servers, CI runners, etc.) where no user is around to notice the silent failure and manually cycle the connection.

To Reproduce

  1. Set up a self-hosted NetBird deployment with Azure AD OpenID Connect as the identity provider.
  2. Connect a client via netbird up and complete the SSO login.
  3. Wait for the SSO/OAuth token to expire (depends on Azure AD token lifetime policy).
  4. Observe that netbird status still shows Management: Connected and Signal: Connected, but traffic through netbird doesn't work
  5. Run netbird down && netbird up — SSO re-authentication is triggered and all peers reconnect normally.

Expected behavior

When the SSO token expires, the client should either:

  • Automatically refresh the token using a refresh token (if available), or
  • Detect the expired/invalid session and trigger a re-authentication flow automatically, or
  • Surface a clear status change (e.g., "Needs Login" / "Session Expired") rather than silently remaining in a "Connected" state with broken peer connectivity.

Are you using NetBird Cloud?

No — self-hosted NetBird control plane (management, signal, relay, dashboard), with Azure AD (Entra ID) configured.
Running on version 0.66.2

NetBird version

0.66.2 (happens with all recent tested version)

Originally created by @JonathanManass on GitHub (Mar 5, 2026). Original GitHub issue: https://github.com/netbirdio/netbird/issues/5513 **Describe the problem** When the SSO session (Azure AD OpenID Connect) expires, the NetBird client remains in a "Connected" state (Management: Connected, Signal: Connected) but peer connectivity silently degrades. Some peers show as "Connecting" indefinitely and traffic no longer flows to them, while the client never triggers a re-authentication prompt. The only workaround is to manually run netbird down followed by netbird up, which triggers a new SSO login flow and restores full connectivity. This makes the client unreliable for long-running machines (servers, CI runners, etc.) where no user is around to notice the silent failure and manually cycle the connection. **To Reproduce** 1. Set up a self-hosted NetBird deployment with Azure AD OpenID Connect as the identity provider. 2. Connect a client via netbird up and complete the SSO login. 3. Wait for the SSO/OAuth token to expire (depends on Azure AD token lifetime policy). 4. Observe that netbird status still shows Management: Connected and Signal: Connected, but traffic through netbird doesn't work 5. Run netbird down && netbird up — SSO re-authentication is triggered and all peers reconnect normally. **Expected behavior** When the SSO token expires, the client should either: - Automatically refresh the token using a refresh token (if available), or - Detect the expired/invalid session and trigger a re-authentication flow automatically, or - Surface a clear status change (e.g., "Needs Login" / "Session Expired") rather than silently remaining in a "Connected" state with broken peer connectivity. **Are you using NetBird Cloud?** No — self-hosted NetBird control plane (management, signal, relay, dashboard), with Azure AD (Entra ID) configured. Running on version 0.66.2 **NetBird version** 0.66.2 (happens with all recent tested version)
saavagebueno added the triage-needed label 2026-08-05 01:26:54 -04:00
Author
Owner

@gbhelp commented on GitHub (Mar 9, 2026):

Probably happens with other SSO providers too. I'm using Keycloak and having the same problem.
I'm going to have a look at the token expiration.

<!-- gh-comment-id:4023379029 --> @gbhelp commented on GitHub (Mar 9, 2026): Probably happens with other SSO providers too. I'm using Keycloak and having the same problem. I'm going to have a look at the token expiration.
Author
Owner

@t984447 commented on GitHub (Mar 12, 2026):

+1

Using selfhosted Netbird with PocketID and same issue on several clients.

<!-- gh-comment-id:4044248782 --> @t984447 commented on GitHub (Mar 12, 2026): +1 Using selfhosted Netbird with PocketID and same issue on several clients.
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#10686