GET/api/users

List users

Lists users for the account. Use service_user to filter the results to regular users or service users; each returned user includes identity, role, status, and group information.

1 parameter
service_userbooleanoptional
Boolean filter that selects either regular users or service users.

5 status codes
200Returns an array of user objects, including each user's identifier, email, name, role, groups, status, and approval state.
auto_groupsarray<string>required
Group IDs to auto-assign to peers registered by this user
emailstringrequired
User's email address
idstringrequired
User ID
idp_idstringoptional
Identity provider ID (connector ID) that the user authenticated with. Only populated for users with Dex-encoded user IDs.
is_blockedbooleanrequired
Is true if this user is blocked. Blocked users can't use the system
is_currentbooleanoptional
Is true if authenticated user is the same as this user
is_service_userbooleanoptional
Is true if this user is a service user
issuedstringoptional
How user was issued by API or Integration
last_loginstringoptional
Last time this user performed a login to the dashboard
namestringrequired
User's name from idp provider
passwordstringoptional
User's password. Only present when user is created (create user endpoint is called) and only when IdP supports user creation with password.
pending_approvalbooleanrequired
Is true if this user requires approval before being activated. Only applicable for users joining via domain matching when user_approval_required is enabled.
permissionsobjectoptional
rolestringrequired
User's NetBird account role
statusstringrequired
User's status
Allowed:activeinvitedblocked
400Returned when the request is invalid, including when `service_user` is not a boolean.
401Returned when the request does not include valid authentication.
403Returned when access to the user list is forbidden.
500Returned when the server encounters an internal error.

Error handling

A 400 is returned when the request is invalid, a 401 when authentication is missing or invalid, a 403 when access is denied, and a 500 when the server encounters an internal error. The service_user query parameter, when supplied, must be a boolean.