1. Packages
  2. Okta
  3. API Docs
  4. user
  5. getUsers
Okta v4.9.2 published on Tuesday, Jun 25, 2024 by Pulumi

okta.user.getUsers

Explore with Pulumi AI

okta logo
Okta v4.9.2 published on Tuesday, Jun 25, 2024 by Pulumi

    Get a list of users from Okta.

    Example Usage

    Lookup Users by Search Criteria

    data “okta.user.getUsers” “example” { search { name = “profile.company” value = “Articulate” comparison = “sw” } }

    Search for multiple users based on a raw search expression string

    data “okta.user.getUsers” “example” { search { expression = “profile.department eq "Engineering" and (created lt "2014-01-01T00:00:00.000Z" or status eq "ACTIVE")” } }

    Lookup Users by Group Membership

    resource “okta.group.Group” “example” { name = “example-group” }

    data “okta.user.getUsers” “example” { group_id = okta_group.example.id

    optionally include each user’s group membership

    include_groups = true

    optionally include each user’s administrator roles

    include_roles = 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(compound_search_operator: Optional[str] = None,
                  delay_read_seconds: Optional[str] = None,
                  group_id: Optional[str] = None,
                  include_groups: Optional[bool] = None,
                  include_roles: Optional[bool] = None,
                  searches: Optional[Sequence[GetUsersSearch]] = None,
                  opts: Optional[InvokeOptions] = None) -> GetUsersResult
    def get_users_output(compound_search_operator: Optional[pulumi.Input[str]] = None,
                  delay_read_seconds: Optional[pulumi.Input[str]] = None,
                  group_id: Optional[pulumi.Input[str]] = None,
                  include_groups: Optional[pulumi.Input[bool]] = None,
                  include_roles: Optional[pulumi.Input[bool]] = None,
                  searches: Optional[pulumi.Input[Sequence[pulumi.Input[GetUsersSearchArgs]]]] = 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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: okta:user/getUsers:getUsers
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompoundSearchOperator string
    Search operator used when joining multiple search clauses
    DelayReadSeconds string
    Force delay of the users read by N seconds. Useful when eventual consistency of users information needs to be allowed for.
    GroupId string
    Find users based on group membership using the id of the group.
    IncludeGroups bool
    Fetch group memberships for each user
    IncludeRoles bool
    Fetch user roles for each user
    Searches List<GetUsersSearch>
    Filter to find user/users. Each filter will be concatenated with the compound search operator. Please be aware profile properties must match what is in Okta, which is likely camel case. Expression is a free form expression filter https://developer.okta.com/docs/reference/core-okta-api/#filter . The set name/value/comparison properties will be ignored if expression is present
    CompoundSearchOperator string
    Search operator used when joining multiple search clauses
    DelayReadSeconds string
    Force delay of the users read by N seconds. Useful when eventual consistency of users information needs to be allowed for.
    GroupId string
    Find users based on group membership using the id of the group.
    IncludeGroups bool
    Fetch group memberships for each user
    IncludeRoles bool
    Fetch user roles for each user
    Searches []GetUsersSearch
    Filter to find user/users. Each filter will be concatenated with the compound search operator. Please be aware profile properties must match what is in Okta, which is likely camel case. Expression is a free form expression filter https://developer.okta.com/docs/reference/core-okta-api/#filter . The set name/value/comparison properties will be ignored if expression is present
    compoundSearchOperator String
    Search operator used when joining multiple search clauses
    delayReadSeconds String
    Force delay of the users read by N seconds. Useful when eventual consistency of users information needs to be allowed for.
    groupId String
    Find users based on group membership using the id of the group.
    includeGroups Boolean
    Fetch group memberships for each user
    includeRoles Boolean
    Fetch user roles for each user
    searches List<GetUsersSearch>
    Filter to find user/users. Each filter will be concatenated with the compound search operator. Please be aware profile properties must match what is in Okta, which is likely camel case. Expression is a free form expression filter https://developer.okta.com/docs/reference/core-okta-api/#filter . The set name/value/comparison properties will be ignored if expression is present
    compoundSearchOperator string
    Search operator used when joining multiple search clauses
    delayReadSeconds string
    Force delay of the users read by N seconds. Useful when eventual consistency of users information needs to be allowed for.
    groupId string
    Find users based on group membership using the id of the group.
    includeGroups boolean
    Fetch group memberships for each user
    includeRoles boolean
    Fetch user roles for each user
    searches GetUsersSearch[]
    Filter to find user/users. Each filter will be concatenated with the compound search operator. Please be aware profile properties must match what is in Okta, which is likely camel case. Expression is a free form expression filter https://developer.okta.com/docs/reference/core-okta-api/#filter . The set name/value/comparison properties will be ignored if expression is present
    compound_search_operator str
    Search operator used when joining multiple search clauses
    delay_read_seconds str
    Force delay of the users read by N seconds. Useful when eventual consistency of users information needs to be allowed for.
    group_id str
    Find users based on group membership using the id of the group.
    include_groups bool
    Fetch group memberships for each user
    include_roles bool
    Fetch user roles for each user
    searches Sequence[GetUsersSearch]
    Filter to find user/users. Each filter will be concatenated with the compound search operator. Please be aware profile properties must match what is in Okta, which is likely camel case. Expression is a free form expression filter https://developer.okta.com/docs/reference/core-okta-api/#filter . The set name/value/comparison properties will be ignored if expression is present
    compoundSearchOperator String
    Search operator used when joining multiple search clauses
    delayReadSeconds String
    Force delay of the users read by N seconds. Useful when eventual consistency of users information needs to be allowed for.
    groupId String
    Find users based on group membership using the id of the group.
    includeGroups Boolean
    Fetch group memberships for each user
    includeRoles Boolean
    Fetch user roles for each user
    searches List<Property Map>
    Filter to find user/users. Each filter will be concatenated with the compound search operator. Please be aware profile properties must match what is in Okta, which is likely camel case. Expression is a free form expression filter https://developer.okta.com/docs/reference/core-okta-api/#filter . The set name/value/comparison properties will be ignored if expression is present

    getUsers Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Users List<GetUsersUser>
    collection of users retrieved from Okta.
    CompoundSearchOperator string
    Search operator used when joining multiple search clauses
    DelayReadSeconds string
    Force delay of the users read by N seconds. Useful when eventual consistency of users information needs to be allowed for.
    GroupId string
    Find users based on group membership using the id of the group.
    IncludeGroups bool
    Fetch group memberships for each user
    IncludeRoles bool
    Fetch user roles for each user
    Searches List<GetUsersSearch>
    Filter to find user/users. Each filter will be concatenated with the compound search operator. Please be aware profile properties must match what is in Okta, which is likely camel case. Expression is a free form expression filter https://developer.okta.com/docs/reference/core-okta-api/#filter . The set name/value/comparison properties will be ignored if expression is present
    Id string
    The provider-assigned unique ID for this managed resource.
    Users []GetUsersUser
    collection of users retrieved from Okta.
    CompoundSearchOperator string
    Search operator used when joining multiple search clauses
    DelayReadSeconds string
    Force delay of the users read by N seconds. Useful when eventual consistency of users information needs to be allowed for.
    GroupId string
    Find users based on group membership using the id of the group.
    IncludeGroups bool
    Fetch group memberships for each user
    IncludeRoles bool
    Fetch user roles for each user
    Searches []GetUsersSearch
    Filter to find user/users. Each filter will be concatenated with the compound search operator. Please be aware profile properties must match what is in Okta, which is likely camel case. Expression is a free form expression filter https://developer.okta.com/docs/reference/core-okta-api/#filter . The set name/value/comparison properties will be ignored if expression is present
    id String
    The provider-assigned unique ID for this managed resource.
    users List<GetUsersUser>
    collection of users retrieved from Okta.
    compoundSearchOperator String
    Search operator used when joining multiple search clauses
    delayReadSeconds String
    Force delay of the users read by N seconds. Useful when eventual consistency of users information needs to be allowed for.
    groupId String
    Find users based on group membership using the id of the group.
    includeGroups Boolean
    Fetch group memberships for each user
    includeRoles Boolean
    Fetch user roles for each user
    searches List<GetUsersSearch>
    Filter to find user/users. Each filter will be concatenated with the compound search operator. Please be aware profile properties must match what is in Okta, which is likely camel case. Expression is a free form expression filter https://developer.okta.com/docs/reference/core-okta-api/#filter . The set name/value/comparison properties will be ignored if expression is present
    id string
    The provider-assigned unique ID for this managed resource.
    users GetUsersUser[]
    collection of users retrieved from Okta.
    compoundSearchOperator string
    Search operator used when joining multiple search clauses
    delayReadSeconds string
    Force delay of the users read by N seconds. Useful when eventual consistency of users information needs to be allowed for.
    groupId string
    Find users based on group membership using the id of the group.
    includeGroups boolean
    Fetch group memberships for each user
    includeRoles boolean
    Fetch user roles for each user
    searches GetUsersSearch[]
    Filter to find user/users. Each filter will be concatenated with the compound search operator. Please be aware profile properties must match what is in Okta, which is likely camel case. Expression is a free form expression filter https://developer.okta.com/docs/reference/core-okta-api/#filter . The set name/value/comparison properties will be ignored if expression is present
    id str
    The provider-assigned unique ID for this managed resource.
    users Sequence[GetUsersUser]
    collection of users retrieved from Okta.
    compound_search_operator str
    Search operator used when joining multiple search clauses
    delay_read_seconds str
    Force delay of the users read by N seconds. Useful when eventual consistency of users information needs to be allowed for.
    group_id str
    Find users based on group membership using the id of the group.
    include_groups bool
    Fetch group memberships for each user
    include_roles bool
    Fetch user roles for each user
    searches Sequence[GetUsersSearch]
    Filter to find user/users. Each filter will be concatenated with the compound search operator. Please be aware profile properties must match what is in Okta, which is likely camel case. Expression is a free form expression filter https://developer.okta.com/docs/reference/core-okta-api/#filter . The set name/value/comparison properties will be ignored if expression is present
    id String
    The provider-assigned unique ID for this managed resource.
    users List<Property Map>
    collection of users retrieved from Okta.
    compoundSearchOperator String
    Search operator used when joining multiple search clauses
    delayReadSeconds String
    Force delay of the users read by N seconds. Useful when eventual consistency of users information needs to be allowed for.
    groupId String
    Find users based on group membership using the id of the group.
    includeGroups Boolean
    Fetch group memberships for each user
    includeRoles Boolean
    Fetch user roles for each user
    searches List<Property Map>
    Filter to find user/users. Each filter will be concatenated with the compound search operator. Please be aware profile properties must match what is in Okta, which is likely camel case. Expression is a free form expression filter https://developer.okta.com/docs/reference/core-okta-api/#filter . The set name/value/comparison properties will be ignored if expression is present

    Supporting Types

    GetUsersSearch

    Comparison string
    Expression string
    A raw search expression string. This requires the search feature be on. Please see Okta documentation on their filter API for users. https://developer.okta.com/docs/api/resources/users#list-users-with-search
    Name string
    Property name to search for. This requires the search feature be on. Please see Okta documentation on their filter API for users. https://developer.okta.com/docs/api/resources/users#list-users-with-search
    Value string
    Comparison string
    Expression string
    A raw search expression string. This requires the search feature be on. Please see Okta documentation on their filter API for users. https://developer.okta.com/docs/api/resources/users#list-users-with-search
    Name string
    Property name to search for. This requires the search feature be on. Please see Okta documentation on their filter API for users. https://developer.okta.com/docs/api/resources/users#list-users-with-search
    Value string
    comparison String
    expression String
    A raw search expression string. This requires the search feature be on. Please see Okta documentation on their filter API for users. https://developer.okta.com/docs/api/resources/users#list-users-with-search
    name String
    Property name to search for. This requires the search feature be on. Please see Okta documentation on their filter API for users. https://developer.okta.com/docs/api/resources/users#list-users-with-search
    value String
    comparison string
    expression string
    A raw search expression string. This requires the search feature be on. Please see Okta documentation on their filter API for users. https://developer.okta.com/docs/api/resources/users#list-users-with-search
    name string
    Property name to search for. This requires the search feature be on. Please see Okta documentation on their filter API for users. https://developer.okta.com/docs/api/resources/users#list-users-with-search
    value string
    comparison str
    expression str
    A raw search expression string. This requires the search feature be on. Please see Okta documentation on their filter API for users. https://developer.okta.com/docs/api/resources/users#list-users-with-search
    name str
    Property name to search for. This requires the search feature be on. Please see Okta documentation on their filter API for users. https://developer.okta.com/docs/api/resources/users#list-users-with-search
    value str
    comparison String
    expression String
    A raw search expression string. This requires the search feature be on. Please see Okta documentation on their filter API for users. https://developer.okta.com/docs/api/resources/users#list-users-with-search
    name String
    Property name to search for. This requires the search feature be on. Please see Okta documentation on their filter API for users. https://developer.okta.com/docs/api/resources/users#list-users-with-search
    value String

    GetUsersUser

    AdminRoles List<string>
    City string
    CostCenter string
    CountryCode string
    CustomProfileAttributes string
    Department string
    DisplayName string
    Division string
    Email string
    EmployeeNumber string
    FirstName string
    GroupMemberships List<string>
    HonorificPrefix string
    HonorificSuffix string
    Id string
    LastName string
    Locale string
    Login string
    Manager string
    ManagerId string
    MiddleName string
    MobilePhone string
    NickName string
    Organization string
    PostalAddress string
    PreferredLanguage string
    PrimaryPhone string
    ProfileUrl string
    Roles List<string>
    SecondEmail string
    State string
    Status string
    StreetAddress string
    Timezone string
    Title string
    UserType string
    ZipCode string
    AdminRoles []string
    City string
    CostCenter string
    CountryCode string
    CustomProfileAttributes string
    Department string
    DisplayName string
    Division string
    Email string
    EmployeeNumber string
    FirstName string
    GroupMemberships []string
    HonorificPrefix string
    HonorificSuffix string
    Id string
    LastName string
    Locale string
    Login string
    Manager string
    ManagerId string
    MiddleName string
    MobilePhone string
    NickName string
    Organization string
    PostalAddress string
    PreferredLanguage string
    PrimaryPhone string
    ProfileUrl string
    Roles []string
    SecondEmail string
    State string
    Status string
    StreetAddress string
    Timezone string
    Title string
    UserType string
    ZipCode string
    adminRoles List<String>
    city String
    costCenter String
    countryCode String
    customProfileAttributes String
    department String
    displayName String
    division String
    email String
    employeeNumber String
    firstName String
    groupMemberships List<String>
    honorificPrefix String
    honorificSuffix String
    id String
    lastName String
    locale String
    login String
    manager String
    managerId String
    middleName String
    mobilePhone String
    nickName String
    organization String
    postalAddress String
    preferredLanguage String
    primaryPhone String
    profileUrl String
    roles List<String>
    secondEmail String
    state String
    status String
    streetAddress String
    timezone String
    title String
    userType String
    zipCode String
    adminRoles string[]
    city string
    costCenter string
    countryCode string
    customProfileAttributes string
    department string
    displayName string
    division string
    email string
    employeeNumber string
    firstName string
    groupMemberships string[]
    honorificPrefix string
    honorificSuffix string
    id string
    lastName string
    locale string
    login string
    manager string
    managerId string
    middleName string
    mobilePhone string
    nickName string
    organization string
    postalAddress string
    preferredLanguage string
    primaryPhone string
    profileUrl string
    roles string[]
    secondEmail string
    state string
    status string
    streetAddress string
    timezone string
    title string
    userType string
    zipCode string
    adminRoles List<String>
    city String
    costCenter String
    countryCode String
    customProfileAttributes String
    department String
    displayName String
    division String
    email String
    employeeNumber String
    firstName String
    groupMemberships List<String>
    honorificPrefix String
    honorificSuffix String
    id String
    lastName String
    locale String
    login String
    manager String
    managerId String
    middleName String
    mobilePhone String
    nickName String
    organization String
    postalAddress String
    preferredLanguage String
    primaryPhone String
    profileUrl String
    roles List<String>
    secondEmail String
    state String
    status String
    streetAddress String
    timezone String
    title String
    userType String
    zipCode String

    Package Details

    Repository
    Okta pulumi/pulumi-okta
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the okta Terraform Provider.
    okta logo
    Okta v4.9.2 published on Tuesday, Jun 25, 2024 by Pulumi