Error "Request has been denied" when connecting with iOS app to selfhosted netbird instance using authentik for IdP #680

Closed
opened 2025-11-20 05:15:55 -05:00 by saavagebueno · 1 comment
Owner

Originally created by @callumgare on GitHub (Mar 6, 2024).

Describe the problem

I'm trying to setup a selfhosted instance of netbird with Authentik as the IdP. Like a number of other people I ran into the issue of Authentik requiring a device code flow setup with is currently undocumented in the netbird Authentik setup guide (https://github.com/goauthentik/authentik/issues/5133). But once I got that resolved I was successfully able to setup a netbird client on macOS and linux using SSO rather than a setup key. However when attempting to connect with the iOS app I get the error "Request has been denied. Flow does not apply to the current user.".

To Reproduce

Steps to reproduce the behavior:

  1. Setup self hosted authentik instance with Authentik as the configured IdP
  2. Attempt to connect to instance with iOS app

Expected behavior

To see the SSO auth screen, the same as show when connecting via the macOS or linux clients.

Are you using NetBird Cloud?
No, self-hosted.

NetBird version

v0.26.2

NetBird status -d output:

I can't run this on the iOS client but this is the output when run on the linux machine I've also connected (dm directly for censored details if relevent for debugging):

~> netbird status -d
Peers detail:
 *****.*****.*****:
  NetBird IP: 100.95.189.76
  Public key: wse97GKP3fUAAUmsuv+FBrH1UIjAa3anYfFQBdBNQw8=
  Status: Connected
  -- detail --
  Connection type: P2P
  Direct: true
  ICE candidate (Local/Remote): host/prflx
  ICE candidate endpoints (Local/Remote): 51.**.**.**:51820/14.**.**.**:51820
  Last connection update: 2024-03-06 07:26:23
  Last WireGuard handshake: 2024-03-06 07:29:23
  Transfer status (received/sent) 684 B/600 B
  Quantum resistance: false

 *****.*****.*****:
  NetBird IP: 100.95.232.245
  Public key: 2B9DOHQQAOZUEZ+a8udo3Iw//LJLeZAmc3G7MKDyEDU=
  Status: Connected
  -- detail --
  Connection type: P2P
  Direct: true
  ICE candidate (Local/Remote): host/prflx
  ICE candidate endpoints (Local/Remote): 51.**.**.**:51820/203.**.**.**:51820
  Last connection update: 2024-03-06 07:26:23
  Last WireGuard handshake: 2024-03-06 07:28:35
  Transfer status (received/sent) 216 B/648 B
  Quantum resistance: false

Daemon version: 0.26.2
CLI version: 0.26.2
Management: Connected to https://netbird.****.***:443
Signal: Connected to https://netbird.****.***:443
Relays:
  [stun:netbird.****.***:3478] is Available
  [turn:netbird.****.***:3478?transport=udp] is Unavailable, reason: allocate: attribute not found
FQDN: ***.****.***
NetBird IP: 100.95.190.112/16
Interface type: Kernel
Quantum resistance: false
Peers count: 2/2 Connected

Screenshots

628E359F-636D-4E8B-B9D4-6FDEEF422E43_1_201_a

Additional context

Thanks for making such a cool service! I particularly love the split dns managment ❤️

Originally created by @callumgare on GitHub (Mar 6, 2024). **Describe the problem** I'm trying to setup a selfhosted instance of netbird with Authentik as the IdP. Like a number of other people I ran into the issue of Authentik requiring a device code flow setup with is currently undocumented in the netbird Authentik setup guide (https://github.com/goauthentik/authentik/issues/5133). But once I got that resolved I was successfully able to setup a netbird client on macOS and linux using SSO rather than a setup key. However when attempting to connect with the iOS app I get the error "Request has been denied. Flow does not apply to the current user.". **To Reproduce** Steps to reproduce the behavior: 1. Setup self hosted authentik instance with Authentik as the configured IdP 2. Attempt to connect to instance with iOS app **Expected behavior** To see the SSO auth screen, the same as show when connecting via the macOS or linux clients. **Are you using NetBird Cloud?** No, self-hosted. **NetBird version** v0.26.2 **NetBird status -d output:** I can't run this on the iOS client but this is the output when run on the linux machine I've also connected (dm directly for censored details if relevent for debugging): ``` ~> netbird status -d Peers detail: *****.*****.*****: NetBird IP: 100.95.189.76 Public key: wse97GKP3fUAAUmsuv+FBrH1UIjAa3anYfFQBdBNQw8= Status: Connected -- detail -- Connection type: P2P Direct: true ICE candidate (Local/Remote): host/prflx ICE candidate endpoints (Local/Remote): 51.**.**.**:51820/14.**.**.**:51820 Last connection update: 2024-03-06 07:26:23 Last WireGuard handshake: 2024-03-06 07:29:23 Transfer status (received/sent) 684 B/600 B Quantum resistance: false *****.*****.*****: NetBird IP: 100.95.232.245 Public key: 2B9DOHQQAOZUEZ+a8udo3Iw//LJLeZAmc3G7MKDyEDU= Status: Connected -- detail -- Connection type: P2P Direct: true ICE candidate (Local/Remote): host/prflx ICE candidate endpoints (Local/Remote): 51.**.**.**:51820/203.**.**.**:51820 Last connection update: 2024-03-06 07:26:23 Last WireGuard handshake: 2024-03-06 07:28:35 Transfer status (received/sent) 216 B/648 B Quantum resistance: false Daemon version: 0.26.2 CLI version: 0.26.2 Management: Connected to https://netbird.****.***:443 Signal: Connected to https://netbird.****.***:443 Relays: [stun:netbird.****.***:3478] is Available [turn:netbird.****.***:3478?transport=udp] is Unavailable, reason: allocate: attribute not found FQDN: ***.****.*** NetBird IP: 100.95.190.112/16 Interface type: Kernel Quantum resistance: false Peers count: 2/2 Connected ``` **Screenshots** ![628E359F-636D-4E8B-B9D4-6FDEEF422E43_1_201_a](https://github.com/netbirdio/netbird/assets/346340/26f0b74c-b6f5-47bf-822c-0bb263404fde) **Additional context** Thanks for making such a cool service! I particularly love the split dns managment ❤️
saavagebueno added the triage-needed label 2025-11-20 05:15:55 -05:00
Author
Owner

@callumgare commented on GitHub (Mar 6, 2024):

Figured it out! I'm not entirely sure what happened by I think somehow the "Authentication flow" setting for my Netbird provider in Authentik got changed, possibly as part of my fiddling to enable https://github.com/goauthentik/authentik/issues/5133. Though I'm not sure I could have changed that in a way that broke SSO for iOS but not my linux clients which I removed and added several times to ensure that SSO was definitely working for them.

Oh well! It's working now so I'll close this ticket. For anyone else who maybe runs into this, I changed the aforementioned "Authentication flow" setting back to my flow labelled "login" (which I renamed from one of the original flows called "default-authorization-flow" I think?).

@callumgare commented on GitHub (Mar 6, 2024): Figured it out! I'm not entirely sure what happened by I think somehow the "Authentication flow" setting for my Netbird provider in Authentik got changed, possibly as part of my fiddling to enable https://github.com/goauthentik/authentik/issues/5133. Though I'm not sure I could have changed that in a way that broke SSO for iOS but not my linux clients which I removed and added several times to ensure that SSO was definitely working for them. Oh well! It's working now so I'll close this ticket. For anyone else who maybe runs into this, I changed the aforementioned "Authentication flow" setting back to my flow labelled "login" (which I renamed from one of the original flows called "default-authorization-flow" I think?).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#680