[GH-ISSUE #1593] Google Idp - User portals not loading - code 401 #2731

Open
opened 2026-08-05 00:48:39 -04:00 by saavagebueno · 5 comments
Owner

Originally created by @Icare-github on GitHub (Feb 19, 2024).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/1593

Describe the problem
User portals not loading, and giving error:
Request failed with status code 401. Please refresh the page if the issue continues.
token invalid
idp = Google

To Reproduce
User (in peers list) present that was removed from Google Workspace.

Are you using NetBird Cloud?
self-host NetBird's control plane.

logs
management-1 | 2024-02-19T14:20:19Z DEBG management/server/account.go:1164: 1201 entries received from IdP management
management-1 | 2024-02-19T14:20:19Z WARN management/server/account.go:1178: user 1142941466876 not found in IDP
management-1 | 2024-02-19T14:20:19Z DEBG management/server/file_store.go:303: released lock for account ci069s8adnmc73c9 in 13.796579304s
management-1 | 2024-02-19T14:20:19Z DEBG management/server/file_store.go:295: acquiring lock for account ci069s8adnmc73c9

Workaround
Once the user was removed from the database, the user portals dod open correctly.

Originally created by @Icare-github on GitHub (Feb 19, 2024). Original GitHub issue: https://github.com/netbirdio/netbird/issues/1593 **Describe the problem** User portals not loading, and giving error: Request failed with status code 401. Please refresh the page if the issue continues. token invalid idp = Google **To Reproduce** User (in peers list) present that was removed from Google Workspace. **Are you using NetBird Cloud?** self-host NetBird's control plane. **logs** management-1 | 2024-02-19T14:20:19Z DEBG management/server/account.go:1164: 1201 entries received from IdP management **management-1 | 2024-02-19T14:20:19Z WARN management/server/account.go:1178: user 1142941466876 not found in IDP** management-1 | 2024-02-19T14:20:19Z DEBG management/server/file_store.go:303: released lock for account ci069s8adnmc73c9 in 13.796579304s management-1 | 2024-02-19T14:20:19Z DEBG management/server/file_store.go:295: acquiring lock for account ci069s8adnmc73c9 **Workaround** Once the user was removed from the database, the user portals dod open correctly.
saavagebueno added the management-serviceidpcache labels 2026-08-05 00:48:39 -04:00
Author
Owner

@mlsmaycon commented on GitHub (Feb 19, 2024):

Thanks for reporting this issue @Icare-github.

This happens due to the management service cache system assumption that if a user doesn't exist in the local cache, it should force refresh the cache on every request. However, the cache will never be consistent with the local store as the user was removed from IDP.

<!-- gh-comment-id:1952653986 --> @mlsmaycon commented on GitHub (Feb 19, 2024): Thanks for reporting this issue @Icare-github. This happens due to the management service cache system assumption that if a user doesn't exist in the local cache, it should force refresh the cache on every request. However, the cache will never be consistent with the local store as the user was removed from IDP.
Author
Owner

@redecs commented on GitHub (May 30, 2024):

Had the same issue with Netbird Self-hosted version 0.27.7. Restarting the management service fixed it (no need to delete any users). I've upgrade now to version 0.27.10 and will see if this happens again.

<!-- gh-comment-id:2139267287 --> @redecs commented on GitHub (May 30, 2024): Had the same issue with Netbird Self-hosted version 0.27.7. Restarting the management service fixed it (no need to delete any users). I've upgrade now to version 0.27.10 and will see if this happens again.
Author
Owner

@Icare-github commented on GitHub (Jul 8, 2024):

We faced a simular issue again due to (Netbird) user being deleted in Google while it still exists in Netbird. Note: restarting the management service only does not resolved the issue.

This is critical as it's impacting connectivity to our environments.

<!-- gh-comment-id:2213954355 --> @Icare-github commented on GitHub (Jul 8, 2024): We faced a simular issue again due to (Netbird) user being deleted in Google while it still exists in Netbird. Note: restarting the management service only does not resolved the issue. This is critical as it's impacting connectivity to our environments.
Author
Owner

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

@Icare-github are you still having this issue with the latest NetBird version?

<!-- gh-comment-id:2824965566 --> @nazarewk commented on GitHub (Apr 23, 2025): @Icare-github are you still having this issue with the latest NetBird version?
Author
Owner

@zeinoux commented on GitHub (Jun 23, 2025):

any update for this issue? i still having issue with the latest version of netbird

<!-- gh-comment-id:2995126362 --> @zeinoux commented on GitHub (Jun 23, 2025): any update for this issue? i still having issue with the latest version of netbird
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#2731