Microsoft SSO - Some PCs will not connect invalid jwt token #2171

Open
opened 2025-11-20 07:05:10 -05:00 by saavagebueno · 0 comments
Owner

Originally created by @ewrmarketing on GitHub (Aug 11, 2025).

We have a handful of clients (under 10), which when they log in for the first time, they are unable to make the connection to netbird, even though the SSO screen comes up and says connected. We have tried at the cmd level and we get the following error:

Error: daemon up failed: sso login failed: waiting sso login failed with: rpc error: code = InvalidArgument desc = invalid jwt token, err: token could not be parsed: Token is expired

In the management logs we see the following:
2025-08-11T07:59:32-07:00 INFO client/internal/connect.go:122: starting NetBird client version 0.54.0 on windows/amd64
2025-08-11T07:59:33-07:00 ERRO shared/management/client/grpc.go:349: failed to login to Management Service: rpc error: code = PermissionDenied desc = no peer auth method provided, please use a setup key or interactive SSO login
2025-08-11T08:00:02-07:00 INFO client/server/server.go:476: active profile: default for
2025-08-11T08:00:02-07:00 ERRO shared/management/client/grpc.go:349: failed to login to Management Service: rpc error: code = PermissionDenied desc = no peer auth method provided, please use a setup key or interactive SSO login
2025-08-11T08:00:02-07:00 WARN client/server/server.go:309: failed login: rpc error: code = InvalidArgument desc = invalid setup-key or no sso information provided, err: invalid UUID length: 0
2025-08-11T08:00:31-07:00 ERRO shared/management/client/grpc.go:349: failed to login to Management Service: rpc error: code = PermissionDenied desc = no peer auth method provided, please use a setup key or interactive SSO login
2025-08-11T08:00:32-07:00 ERRO shared/management/client/grpc.go:349: failed to login to Management Service: rpc error: code = InvalidArgument desc = invalid jwt token, err: token could not be parsed: Token is expired
2025-08-11T08:00:32-07:00 ERRO client/internal/login.go:152: failed registering peer rpc error: code = InvalidArgument desc = invalid jwt token, err: token could not be parsed: Token is expired
2025-08-11T08:00:32-07:00 WARN client/server/server.go:309: failed login: rpc error: code = InvalidArgument desc = invalid jwt token, err: token could not be parsed: Token is expired

If we setup a computer having this issue with a setup key, it gets logged in with no problem.
It seems there is a hit and miss issue with Microsoft SSO working and giving back a key.

We have restarted the management portal and still the same results.

***Update - 8/16/2025
We have our clients require re-authentication after 24 hours - This is the behavior we are seeing:
Computer 1:
Day 1 - Reauthenticate with no issue
Day 2 - Takes 4 times - Website shows Netbird Authenticated, but Netbird fails to connect
Day 3 - Reauthenticate with no issue
Day 4 - Takes 3 times - Website shows Netbird Authenticated, but Netbird fails to connect

Computer 2:
Day 1 - Reauthenticate with no issue
Day 2 - Takes 2 times - Website shows Netbird Authenticated, but Netbird fails to connect
Day 3 - Reauthenticate with no issue
Day 4 - Reauthenticate with no issue

Computer 3:
Day 1 - Reauthenticate with no issue
Day 2 - Reauthenticate with no issue
Day 3 - Reauthenticate with no issue
Day 4 - No longer will Authenticate - Had to delete peer and setup using key

Are you using NetBird Cloud?

Self Hosted

NetBird version
54.0

netbird version
54.0

Is any other VPN software installed?
No
Debug output

Have you tried these troubleshooting steps?

  • [Yes ] Reviewed client troubleshooting (if applicable)
  • [ Yes] Checked for newer NetBird versions
  • [ Yes] Searched for similar issues on GitHub (including closed ones)
  • [ Yes] Restarted the NetBird client
  • [ Yes] Disabled other VPN software
  • [ Yes] Checked firewall settings
Originally created by @ewrmarketing on GitHub (Aug 11, 2025). We have a handful of clients (under 10), which when they log in for the first time, they are unable to make the connection to netbird, even though the SSO screen comes up and says connected. We have tried at the cmd level and we get the following error: Error: daemon up failed: sso login failed: waiting sso login failed with: rpc error: code = InvalidArgument desc = invalid jwt token, err: token could not be parsed: Token is expired In the management logs we see the following: 2025-08-11T07:59:32-07:00 INFO client/internal/connect.go:122: starting NetBird client version 0.54.0 on windows/amd64 2025-08-11T07:59:33-07:00 ERRO shared/management/client/grpc.go:349: failed to login to Management Service: rpc error: code = PermissionDenied desc = no peer auth method provided, please use a setup key or interactive SSO login 2025-08-11T08:00:02-07:00 INFO client/server/server.go:476: active profile: default for 2025-08-11T08:00:02-07:00 ERRO shared/management/client/grpc.go:349: failed to login to Management Service: rpc error: code = PermissionDenied desc = no peer auth method provided, please use a setup key or interactive SSO login 2025-08-11T08:00:02-07:00 WARN client/server/server.go:309: failed login: rpc error: code = InvalidArgument desc = invalid setup-key or no sso information provided, err: invalid UUID length: 0 2025-08-11T08:00:31-07:00 ERRO shared/management/client/grpc.go:349: failed to login to Management Service: rpc error: code = PermissionDenied desc = no peer auth method provided, please use a setup key or interactive SSO login 2025-08-11T08:00:32-07:00 ERRO shared/management/client/grpc.go:349: failed to login to Management Service: rpc error: code = InvalidArgument desc = invalid jwt token, err: token could not be parsed: Token is expired 2025-08-11T08:00:32-07:00 ERRO client/internal/login.go:152: failed registering peer rpc error: code = InvalidArgument desc = invalid jwt token, err: token could not be parsed: Token is expired 2025-08-11T08:00:32-07:00 WARN client/server/server.go:309: failed login: rpc error: code = InvalidArgument desc = invalid jwt token, err: token could not be parsed: Token is expired If we setup a computer having this issue with a setup key, it gets logged in with no problem. It seems there is a hit and miss issue with Microsoft SSO working and giving back a key. We have restarted the management portal and still the same results. ***Update - 8/16/2025 We have our clients require re-authentication after 24 hours - This is the behavior we are seeing: Computer 1: Day 1 - Reauthenticate with no issue Day 2 - Takes 4 times - Website shows Netbird Authenticated, but Netbird fails to connect Day 3 - Reauthenticate with no issue Day 4 - Takes 3 times - Website shows Netbird Authenticated, but Netbird fails to connect Computer 2: Day 1 - Reauthenticate with no issue Day 2 - Takes 2 times - Website shows Netbird Authenticated, but Netbird fails to connect Day 3 - Reauthenticate with no issue Day 4 - Reauthenticate with no issue Computer 3: Day 1 - Reauthenticate with no issue Day 2 - Reauthenticate with no issue Day 3 - Reauthenticate with no issue Day 4 - No longer will Authenticate - Had to delete peer and setup using key **Are you using NetBird Cloud?** Self Hosted **NetBird version** 54.0 `netbird version` 54.0 **Is any other VPN software installed?** No **Debug output** **Have you tried these troubleshooting steps?** - [Yes ] Reviewed [client troubleshooting](https://docs.netbird.io/how-to/troubleshooting-client) (if applicable) - [ Yes] Checked for newer NetBird versions - [ Yes] Searched for similar issues on GitHub (including closed ones) - [ Yes] Restarted the NetBird client - [ Yes] Disabled other VPN software - [ Yes] Checked firewall settings
saavagebueno added the self-hostingazure labels 2025-11-20 07:05:11 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#2171