Okta v4.8.1 published on Thursday, Apr 18, 2024 by Pulumi
okta.user.getUser
Explore with Pulumi AI
Use this data source to retrieve a users from Okta.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";
const example = okta.user.getUser({
searches: [{
expression: "profile.firstName eq \"John\"",
}],
});
import pulumi
import pulumi_okta as okta
example = okta.user.get_user(searches=[okta.user.GetUserSearchArgs(
expression="profile.firstName eq \"John\"",
)])
package main
import (
"github.com/pulumi/pulumi-okta/sdk/v4/go/okta/user"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := user.LookupUser(ctx, &user.LookupUserArgs{
Searches: []user.GetUserSearch{
{
Expression: pulumi.StringRef("profile.firstName eq \"John\""),
},
},
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Okta = Pulumi.Okta;
return await Deployment.RunAsync(() =>
{
var example = Okta.User.GetUser.Invoke(new()
{
Searches = new[]
{
new Okta.User.Inputs.GetUserSearchInputArgs
{
Expression = "profile.firstName eq \"John\"",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.okta.user.UserFunctions;
import com.pulumi.okta.user.inputs.GetUserArgs;
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 example = UserFunctions.getUser(GetUserArgs.builder()
.searches(GetUserSearchArgs.builder()
.expression("profile.firstName eq \"John\"")
.build())
.build());
}
}
variables:
example:
fn::invoke:
Function: okta:user:getUser
Arguments:
searches:
- expression: profile.firstName eq "John"
Using getUser
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 getUser(args: GetUserArgs, opts?: InvokeOptions): Promise<GetUserResult>
function getUserOutput(args: GetUserOutputArgs, opts?: InvokeOptions): Output<GetUserResult>
def get_user(compound_search_operator: Optional[str] = None,
delay_read_seconds: Optional[str] = None,
searches: Optional[Sequence[GetUserSearch]] = None,
skip_groups: Optional[bool] = None,
skip_roles: Optional[bool] = None,
user_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetUserResult
def get_user_output(compound_search_operator: Optional[pulumi.Input[str]] = None,
delay_read_seconds: Optional[pulumi.Input[str]] = None,
searches: Optional[pulumi.Input[Sequence[pulumi.Input[GetUserSearchArgs]]]] = None,
skip_groups: Optional[pulumi.Input[bool]] = None,
skip_roles: Optional[pulumi.Input[bool]] = None,
user_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetUserResult]
func LookupUser(ctx *Context, args *LookupUserArgs, opts ...InvokeOption) (*LookupUserResult, error)
func LookupUserOutput(ctx *Context, args *LookupUserOutputArgs, opts ...InvokeOption) LookupUserResultOutput
> Note: This function is named LookupUser
in the Go SDK.
public static class GetUser
{
public static Task<GetUserResult> InvokeAsync(GetUserArgs args, InvokeOptions? opts = null)
public static Output<GetUserResult> Invoke(GetUserInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetUserResult> getUser(GetUserArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: okta:user/getUser:getUser
arguments:
# arguments dictionary
The following arguments are supported:
- Compound
Search stringOperator - Given multiple search elements they will be compounded together with the op. Default is
and
,or
is also valid. - Delay
Read stringSeconds - Force delay of the user read by N seconds. Useful when eventual consistency of user information needs to be allowed for.
- Searches
List<Get
User Search> - Map of search criteria. It supports the following properties.
- Skip
Groups bool - Skip
Roles bool - User
Id string - String representing a specific user's id value
- Compound
Search stringOperator - Given multiple search elements they will be compounded together with the op. Default is
and
,or
is also valid. - Delay
Read stringSeconds - Force delay of the user read by N seconds. Useful when eventual consistency of user information needs to be allowed for.
- Searches
[]Get
User Search - Map of search criteria. It supports the following properties.
- Skip
Groups bool - Skip
Roles bool - User
Id string - String representing a specific user's id value
- compound
Search StringOperator - Given multiple search elements they will be compounded together with the op. Default is
and
,or
is also valid. - delay
Read StringSeconds - Force delay of the user read by N seconds. Useful when eventual consistency of user information needs to be allowed for.
- searches
List<Get
User Search> - Map of search criteria. It supports the following properties.
- skip
Groups Boolean - skip
Roles Boolean - user
Id String - String representing a specific user's id value
- compound
Search stringOperator - Given multiple search elements they will be compounded together with the op. Default is
and
,or
is also valid. - delay
Read stringSeconds - Force delay of the user read by N seconds. Useful when eventual consistency of user information needs to be allowed for.
- searches
Get
User Search[] - Map of search criteria. It supports the following properties.
- skip
Groups boolean - skip
Roles boolean - user
Id string - String representing a specific user's id value
- compound_
search_ stroperator - Given multiple search elements they will be compounded together with the op. Default is
and
,or
is also valid. - delay_
read_ strseconds - Force delay of the user read by N seconds. Useful when eventual consistency of user information needs to be allowed for.
- searches
Sequence[Get
User Search] - Map of search criteria. It supports the following properties.
- skip_
groups bool - skip_
roles bool - user_
id str - String representing a specific user's id value
- compound
Search StringOperator - Given multiple search elements they will be compounded together with the op. Default is
and
,or
is also valid. - delay
Read StringSeconds - Force delay of the user read by N seconds. Useful when eventual consistency of user information needs to be allowed for.
- searches List<Property Map>
- Map of search criteria. It supports the following properties.
- skip
Groups Boolean - skip
Roles Boolean - user
Id String - String representing a specific user's id value
getUser Result
The following output properties are available:
- Admin
Roles List<string> - City string
- City or locality component of user's address.
- Cost
Center string - Name of a cost center assigned to user.
- Country
Code string - Country name component of user's address.
- Custom
Profile stringAttributes - Raw JSON containing all custom profile attributes.
- Department string
- Name of user's department.
- Display
Name string - Name of the user, suitable for display to end users.
- Division string
- Name of user's division.
- Email string
- Primary email address of user.
- Employee
Number string - Organization or company assigned unique identifier for the user.
- First
Name string - Given name of the user.
- Group
Memberships List<string> - Honorific
Prefix string - Honorific prefix(es) of the user, or title in most Western languages.
- Honorific
Suffix string - Honorific suffix(es) of the user.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Name string - Family name of the user.
- Locale string
- User's default location for purposes of localizing items such as currency, date time format, numerical representations, etc.
- Login string
- Unique identifier for the user.
- Manager string
- Display name of the user's manager.
- Manager
Id string id
of a user's manager.- Middle
Name string - Middle name(s) of the user.
- Mobile
Phone string - Mobile phone number of user.
- Nick
Name string - Casual way to address the user in real life.
- Organization string
- Name of user's organization.
- Postal
Address string - Mailing address component of user's address.
- Preferred
Language string - User's preferred written or spoken languages.
- Primary
Phone string - Primary phone number of user such as home number.
- Profile
Url string - URL of user's online profile (e.g. a web page).
- Roles List<string>
- All roles assigned to user.
- Second
Email string - Secondary email address of user typically used for account recovery.
- State string
- State or region component of user's address (region).
- Status string
- Current status of user.
- Street
Address string - Full street address component of user's address.
- Timezone string
- User's time zone.
- Title string
- User's title, such as "Vice President".
- User
Type string - Used to describe the organization to user relationship such as "Employee" or "Contractor".
- Zip
Code string - Zipcode or postal code component of user's address (postalCode)
- Compound
Search stringOperator - Delay
Read stringSeconds - Searches
List<Get
User Search> - Skip
Groups bool - Skip
Roles bool - User
Id string
- Admin
Roles []string - City string
- City or locality component of user's address.
- Cost
Center string - Name of a cost center assigned to user.
- Country
Code string - Country name component of user's address.
- Custom
Profile stringAttributes - Raw JSON containing all custom profile attributes.
- Department string
- Name of user's department.
- Display
Name string - Name of the user, suitable for display to end users.
- Division string
- Name of user's division.
- Email string
- Primary email address of user.
- Employee
Number string - Organization or company assigned unique identifier for the user.
- First
Name string - Given name of the user.
- Group
Memberships []string - Honorific
Prefix string - Honorific prefix(es) of the user, or title in most Western languages.
- Honorific
Suffix string - Honorific suffix(es) of the user.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Name string - Family name of the user.
- Locale string
- User's default location for purposes of localizing items such as currency, date time format, numerical representations, etc.
- Login string
- Unique identifier for the user.
- Manager string
- Display name of the user's manager.
- Manager
Id string id
of a user's manager.- Middle
Name string - Middle name(s) of the user.
- Mobile
Phone string - Mobile phone number of user.
- Nick
Name string - Casual way to address the user in real life.
- Organization string
- Name of user's organization.
- Postal
Address string - Mailing address component of user's address.
- Preferred
Language string - User's preferred written or spoken languages.
- Primary
Phone string - Primary phone number of user such as home number.
- Profile
Url string - URL of user's online profile (e.g. a web page).
- Roles []string
- All roles assigned to user.
- Second
Email string - Secondary email address of user typically used for account recovery.
- State string
- State or region component of user's address (region).
- Status string
- Current status of user.
- Street
Address string - Full street address component of user's address.
- Timezone string
- User's time zone.
- Title string
- User's title, such as "Vice President".
- User
Type string - Used to describe the organization to user relationship such as "Employee" or "Contractor".
- Zip
Code string - Zipcode or postal code component of user's address (postalCode)
- Compound
Search stringOperator - Delay
Read stringSeconds - Searches
[]Get
User Search - Skip
Groups bool - Skip
Roles bool - User
Id string
- admin
Roles List<String> - city String
- City or locality component of user's address.
- cost
Center String - Name of a cost center assigned to user.
- country
Code String - Country name component of user's address.
- custom
Profile StringAttributes - Raw JSON containing all custom profile attributes.
- department String
- Name of user's department.
- display
Name String - Name of the user, suitable for display to end users.
- division String
- Name of user's division.
- email String
- Primary email address of user.
- employee
Number String - Organization or company assigned unique identifier for the user.
- first
Name String - Given name of the user.
- group
Memberships List<String> - honorific
Prefix String - Honorific prefix(es) of the user, or title in most Western languages.
- honorific
Suffix String - Honorific suffix(es) of the user.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Name String - Family name of the user.
- locale String
- User's default location for purposes of localizing items such as currency, date time format, numerical representations, etc.
- login String
- Unique identifier for the user.
- manager String
- Display name of the user's manager.
- manager
Id String id
of a user's manager.- middle
Name String - Middle name(s) of the user.
- mobile
Phone String - Mobile phone number of user.
- nick
Name String - Casual way to address the user in real life.
- organization String
- Name of user's organization.
- postal
Address String - Mailing address component of user's address.
- preferred
Language String - User's preferred written or spoken languages.
- primary
Phone String - Primary phone number of user such as home number.
- profile
Url String - URL of user's online profile (e.g. a web page).
- roles List<String>
- All roles assigned to user.
- second
Email String - Secondary email address of user typically used for account recovery.
- state String
- State or region component of user's address (region).
- status String
- Current status of user.
- street
Address String - Full street address component of user's address.
- timezone String
- User's time zone.
- title String
- User's title, such as "Vice President".
- user
Type String - Used to describe the organization to user relationship such as "Employee" or "Contractor".
- zip
Code String - Zipcode or postal code component of user's address (postalCode)
- compound
Search StringOperator - delay
Read StringSeconds - searches
List<Get
User Search> - skip
Groups Boolean - skip
Roles Boolean - user
Id String
- admin
Roles string[] - city string
- City or locality component of user's address.
- cost
Center string - Name of a cost center assigned to user.
- country
Code string - Country name component of user's address.
- custom
Profile stringAttributes - Raw JSON containing all custom profile attributes.
- department string
- Name of user's department.
- display
Name string - Name of the user, suitable for display to end users.
- division string
- Name of user's division.
- email string
- Primary email address of user.
- employee
Number string - Organization or company assigned unique identifier for the user.
- first
Name string - Given name of the user.
- group
Memberships string[] - honorific
Prefix string - Honorific prefix(es) of the user, or title in most Western languages.
- honorific
Suffix string - Honorific suffix(es) of the user.
- id string
- The provider-assigned unique ID for this managed resource.
- last
Name string - Family name of the user.
- locale string
- User's default location for purposes of localizing items such as currency, date time format, numerical representations, etc.
- login string
- Unique identifier for the user.
- manager string
- Display name of the user's manager.
- manager
Id string id
of a user's manager.- middle
Name string - Middle name(s) of the user.
- mobile
Phone string - Mobile phone number of user.
- nick
Name string - Casual way to address the user in real life.
- organization string
- Name of user's organization.
- postal
Address string - Mailing address component of user's address.
- preferred
Language string - User's preferred written or spoken languages.
- primary
Phone string - Primary phone number of user such as home number.
- profile
Url string - URL of user's online profile (e.g. a web page).
- roles string[]
- All roles assigned to user.
- second
Email string - Secondary email address of user typically used for account recovery.
- state string
- State or region component of user's address (region).
- status string
- Current status of user.
- street
Address string - Full street address component of user's address.
- timezone string
- User's time zone.
- title string
- User's title, such as "Vice President".
- user
Type string - Used to describe the organization to user relationship such as "Employee" or "Contractor".
- zip
Code string - Zipcode or postal code component of user's address (postalCode)
- compound
Search stringOperator - delay
Read stringSeconds - searches
Get
User Search[] - skip
Groups boolean - skip
Roles boolean - user
Id string
- admin_
roles Sequence[str] - city str
- City or locality component of user's address.
- cost_
center str - Name of a cost center assigned to user.
- country_
code str - Country name component of user's address.
- custom_
profile_ strattributes - Raw JSON containing all custom profile attributes.
- department str
- Name of user's department.
- display_
name str - Name of the user, suitable for display to end users.
- division str
- Name of user's division.
- email str
- Primary email address of user.
- employee_
number str - Organization or company assigned unique identifier for the user.
- first_
name str - Given name of the user.
- group_
memberships Sequence[str] - honorific_
prefix str - Honorific prefix(es) of the user, or title in most Western languages.
- honorific_
suffix str - Honorific suffix(es) of the user.
- id str
- The provider-assigned unique ID for this managed resource.
- last_
name str - Family name of the user.
- locale str
- User's default location for purposes of localizing items such as currency, date time format, numerical representations, etc.
- login str
- Unique identifier for the user.
- manager str
- Display name of the user's manager.
- manager_
id str id
of a user's manager.- middle_
name str - Middle name(s) of the user.
- mobile_
phone str - Mobile phone number of user.
- nick_
name str - Casual way to address the user in real life.
- organization str
- Name of user's organization.
- postal_
address str - Mailing address component of user's address.
- preferred_
language str - User's preferred written or spoken languages.
- primary_
phone str - Primary phone number of user such as home number.
- profile_
url str - URL of user's online profile (e.g. a web page).
- roles Sequence[str]
- All roles assigned to user.
- second_
email str - Secondary email address of user typically used for account recovery.
- state str
- State or region component of user's address (region).
- status str
- Current status of user.
- street_
address str - Full street address component of user's address.
- timezone str
- User's time zone.
- title str
- User's title, such as "Vice President".
- user_
type str - Used to describe the organization to user relationship such as "Employee" or "Contractor".
- zip_
code str - Zipcode or postal code component of user's address (postalCode)
- compound_
search_ stroperator - delay_
read_ strseconds - searches
Sequence[Get
User Search] - skip_
groups bool - skip_
roles bool - user_
id str
- admin
Roles List<String> - city String
- City or locality component of user's address.
- cost
Center String - Name of a cost center assigned to user.
- country
Code String - Country name component of user's address.
- custom
Profile StringAttributes - Raw JSON containing all custom profile attributes.
- department String
- Name of user's department.
- display
Name String - Name of the user, suitable for display to end users.
- division String
- Name of user's division.
- email String
- Primary email address of user.
- employee
Number String - Organization or company assigned unique identifier for the user.
- first
Name String - Given name of the user.
- group
Memberships List<String> - honorific
Prefix String - Honorific prefix(es) of the user, or title in most Western languages.
- honorific
Suffix String - Honorific suffix(es) of the user.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Name String - Family name of the user.
- locale String
- User's default location for purposes of localizing items such as currency, date time format, numerical representations, etc.
- login String
- Unique identifier for the user.
- manager String
- Display name of the user's manager.
- manager
Id String id
of a user's manager.- middle
Name String - Middle name(s) of the user.
- mobile
Phone String - Mobile phone number of user.
- nick
Name String - Casual way to address the user in real life.
- organization String
- Name of user's organization.
- postal
Address String - Mailing address component of user's address.
- preferred
Language String - User's preferred written or spoken languages.
- primary
Phone String - Primary phone number of user such as home number.
- profile
Url String - URL of user's online profile (e.g. a web page).
- roles List<String>
- All roles assigned to user.
- second
Email String - Secondary email address of user typically used for account recovery.
- state String
- State or region component of user's address (region).
- status String
- Current status of user.
- street
Address String - Full street address component of user's address.
- timezone String
- User's time zone.
- title String
- User's title, such as "Vice President".
- user
Type String - Used to describe the organization to user relationship such as "Employee" or "Contractor".
- zip
Code String - Zipcode or postal code component of user's address (postalCode)
- compound
Search StringOperator - delay
Read StringSeconds - searches List<Property Map>
- skip
Groups Boolean - skip
Roles Boolean - user
Id String
Supporting Types
GetUserSearch
- Comparison string
- Comparison to use. Comparitors for strings:
eq
,ge
,gt
,le
,lt
,ne
,pr
,sw
. - Expression string
- A raw search expression string. If present it will override name/comparison/value.
- Name string
- Name of property to search against.
- Value string
- Value to compare with.
- Comparison string
- Comparison to use. Comparitors for strings:
eq
,ge
,gt
,le
,lt
,ne
,pr
,sw
. - Expression string
- A raw search expression string. If present it will override name/comparison/value.
- Name string
- Name of property to search against.
- Value string
- Value to compare with.
- comparison String
- Comparison to use. Comparitors for strings:
eq
,ge
,gt
,le
,lt
,ne
,pr
,sw
. - expression String
- A raw search expression string. If present it will override name/comparison/value.
- name String
- Name of property to search against.
- value String
- Value to compare with.
- comparison string
- Comparison to use. Comparitors for strings:
eq
,ge
,gt
,le
,lt
,ne
,pr
,sw
. - expression string
- A raw search expression string. If present it will override name/comparison/value.
- name string
- Name of property to search against.
- value string
- Value to compare with.
- comparison str
- Comparison to use. Comparitors for strings:
eq
,ge
,gt
,le
,lt
,ne
,pr
,sw
. - expression str
- A raw search expression string. If present it will override name/comparison/value.
- name str
- Name of property to search against.
- value str
- Value to compare with.
- comparison String
- Comparison to use. Comparitors for strings:
eq
,ge
,gt
,le
,lt
,ne
,pr
,sw
. - expression String
- A raw search expression string. If present it will override name/comparison/value.
- name String
- Name of property to search against.
- value String
- Value to compare with.
Package Details
- Repository
- Okta pulumi/pulumi-okta
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
okta
Terraform Provider.