1. Packages
  2. Authentik Provider
  3. API Docs
  4. getUsers
authentik 2025.2.0 published on Monday, Mar 24, 2025 by goauthentik

authentik.getUsers

Explore with Pulumi AI

authentik logo
authentik 2025.2.0 published on Monday, Mar 24, 2025 by goauthentik

    Get users list

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as authentik from "@pulumi/authentik";
    
    const all = authentik.getUsers({});
    const admins = authentik.getUsers({
        isSuperuser: true,
    });
    
    import pulumi
    import pulumi_authentik as authentik
    
    all = authentik.get_users()
    admins = authentik.get_users(is_superuser=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/authentik/v2025/authentik"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := authentik.GetUsers(ctx, &authentik.GetUsersArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = authentik.GetUsers(ctx, &authentik.GetUsersArgs{
    			IsSuperuser: pulumi.BoolRef(true),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Authentik = Pulumi.Authentik;
    
    return await Deployment.RunAsync(() => 
    {
        var all = Authentik.GetUsers.Invoke();
    
        var admins = Authentik.GetUsers.Invoke(new()
        {
            IsSuperuser = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.authentik.AuthentikFunctions;
    import com.pulumi.authentik.inputs.GetUsersArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var all = AuthentikFunctions.getUsers();
    
            final var admins = AuthentikFunctions.getUsers(GetUsersArgs.builder()
                .isSuperuser(true)
                .build());
    
        }
    }
    
    variables:
      all:
        fn::invoke:
          function: authentik:getUsers
          arguments: {}
      admins:
        fn::invoke:
          function: authentik:getUsers
          arguments:
            isSuperuser: true
    

    Using getUsers

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getUsers(args: GetUsersArgs, opts?: InvokeOptions): Promise<GetUsersResult>
    function getUsersOutput(args: GetUsersOutputArgs, opts?: InvokeOptions): Output<GetUsersResult>
    def get_users(attributes: Optional[str] = None,
                  email: Optional[str] = None,
                  groups_by_names: Optional[Sequence[str]] = None,
                  groups_by_pks: Optional[Sequence[str]] = None,
                  id: Optional[str] = None,
                  is_active: Optional[bool] = None,
                  is_superuser: Optional[bool] = None,
                  name: Optional[str] = None,
                  ordering: Optional[str] = None,
                  path: Optional[str] = None,
                  path_startswith: Optional[str] = None,
                  search: Optional[str] = None,
                  username: Optional[str] = None,
                  uuid: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetUsersResult
    def get_users_output(attributes: Optional[pulumi.Input[str]] = None,
                  email: Optional[pulumi.Input[str]] = None,
                  groups_by_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                  groups_by_pks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                  id: Optional[pulumi.Input[str]] = None,
                  is_active: Optional[pulumi.Input[bool]] = None,
                  is_superuser: Optional[pulumi.Input[bool]] = None,
                  name: Optional[pulumi.Input[str]] = None,
                  ordering: Optional[pulumi.Input[str]] = None,
                  path: Optional[pulumi.Input[str]] = None,
                  path_startswith: Optional[pulumi.Input[str]] = None,
                  search: Optional[pulumi.Input[str]] = None,
                  username: Optional[pulumi.Input[str]] = None,
                  uuid: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetUsersResult]
    func GetUsers(ctx *Context, args *GetUsersArgs, opts ...InvokeOption) (*GetUsersResult, error)
    func GetUsersOutput(ctx *Context, args *GetUsersOutputArgs, opts ...InvokeOption) GetUsersResultOutput

    > Note: This function is named GetUsers in the Go SDK.

    public static class GetUsers 
    {
        public static Task<GetUsersResult> InvokeAsync(GetUsersArgs args, InvokeOptions? opts = null)
        public static Output<GetUsersResult> Invoke(GetUsersInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetUsersResult> getUsers(GetUsersArgs args, InvokeOptions options)
    public static Output<GetUsersResult> getUsers(GetUsersArgs args, InvokeOptions options)
    
    fn::invoke:
      function: authentik:index/getUsers:getUsers
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Attributes string
    Email string
    GroupsByNames List<string>
    GroupsByPks List<string>
    Id string
    The ID of this resource.
    IsActive bool
    IsSuperuser bool
    Name string
    Ordering string
    Path string
    PathStartswith string
    Search string
    Username string
    Uuid string
    Attributes string
    Email string
    GroupsByNames []string
    GroupsByPks []string
    Id string
    The ID of this resource.
    IsActive bool
    IsSuperuser bool
    Name string
    Ordering string
    Path string
    PathStartswith string
    Search string
    Username string
    Uuid string
    attributes String
    email String
    groupsByNames List<String>
    groupsByPks List<String>
    id String
    The ID of this resource.
    isActive Boolean
    isSuperuser Boolean
    name String
    ordering String
    path String
    pathStartswith String
    search String
    username String
    uuid String
    attributes string
    email string
    groupsByNames string[]
    groupsByPks string[]
    id string
    The ID of this resource.
    isActive boolean
    isSuperuser boolean
    name string
    ordering string
    path string
    pathStartswith string
    search string
    username string
    uuid string
    attributes str
    email str
    groups_by_names Sequence[str]
    groups_by_pks Sequence[str]
    id str
    The ID of this resource.
    is_active bool
    is_superuser bool
    name str
    ordering str
    path str
    path_startswith str
    search str
    username str
    uuid str
    attributes String
    email String
    groupsByNames List<String>
    groupsByPks List<String>
    id String
    The ID of this resource.
    isActive Boolean
    isSuperuser Boolean
    name String
    ordering String
    path String
    pathStartswith String
    search String
    username String
    uuid String

    getUsers Result

    The following output properties are available:

    Id string
    The ID of this resource.
    Users List<GetUsersUser>
    Generated.
    Attributes string
    Email string
    GroupsByNames List<string>
    GroupsByPks List<string>
    IsActive bool
    IsSuperuser bool
    Name string
    Ordering string
    Path string
    PathStartswith string
    Search string
    Username string
    Uuid string
    Id string
    The ID of this resource.
    Users []GetUsersUser
    Generated.
    Attributes string
    Email string
    GroupsByNames []string
    GroupsByPks []string
    IsActive bool
    IsSuperuser bool
    Name string
    Ordering string
    Path string
    PathStartswith string
    Search string
    Username string
    Uuid string
    id String
    The ID of this resource.
    users List<GetUsersUser>
    Generated.
    attributes String
    email String
    groupsByNames List<String>
    groupsByPks List<String>
    isActive Boolean
    isSuperuser Boolean
    name String
    ordering String
    path String
    pathStartswith String
    search String
    username String
    uuid String
    id string
    The ID of this resource.
    users GetUsersUser[]
    Generated.
    attributes string
    email string
    groupsByNames string[]
    groupsByPks string[]
    isActive boolean
    isSuperuser boolean
    name string
    ordering string
    path string
    pathStartswith string
    search string
    username string
    uuid string
    id str
    The ID of this resource.
    users Sequence[GetUsersUser]
    Generated.
    attributes str
    email str
    groups_by_names Sequence[str]
    groups_by_pks Sequence[str]
    is_active bool
    is_superuser bool
    name str
    ordering str
    path str
    path_startswith str
    search str
    username str
    uuid str
    id String
    The ID of this resource.
    users List<Property Map>
    Generated.
    attributes String
    email String
    groupsByNames List<String>
    groupsByPks List<String>
    isActive Boolean
    isSuperuser Boolean
    name String
    ordering String
    path String
    pathStartswith String
    search String
    username String
    uuid String

    Supporting Types

    GetUsersUser

    Attributes string
    Avatar string
    Email string
    Groups List<string>
    IsActive bool
    IsSuperuser bool
    LastLogin string
    Name string
    Path string
    Pk double
    Type string
    Uid string
    Username string
    Uuid string
    Attributes string
    Avatar string
    Email string
    Groups []string
    IsActive bool
    IsSuperuser bool
    LastLogin string
    Name string
    Path string
    Pk float64
    Type string
    Uid string
    Username string
    Uuid string
    attributes String
    avatar String
    email String
    groups List<String>
    isActive Boolean
    isSuperuser Boolean
    lastLogin String
    name String
    path String
    pk Double
    type String
    uid String
    username String
    uuid String
    attributes string
    avatar string
    email string
    groups string[]
    isActive boolean
    isSuperuser boolean
    lastLogin string
    name string
    path string
    pk number
    type string
    uid string
    username string
    uuid string
    attributes str
    avatar str
    email str
    groups Sequence[str]
    is_active bool
    is_superuser bool
    last_login str
    name str
    path str
    pk float
    type str
    uid str
    username str
    uuid str
    attributes String
    avatar String
    email String
    groups List<String>
    isActive Boolean
    isSuperuser Boolean
    lastLogin String
    name String
    path String
    pk Number
    type String
    uid String
    username String
    uuid String

    Package Details

    Repository
    authentik goauthentik/terraform-provider-authentik
    License
    Notes
    This Pulumi package is based on the authentik Terraform Provider.
    authentik logo
    authentik 2025.2.0 published on Monday, Mar 24, 2025 by goauthentik