FusionAuth v6.0.2 published on Sunday, Feb 9, 2025 by Theo Gravity
fusionauth.getUser
Explore with Pulumi AI
# User Data Source
This data source can be used to fetch information about a specific user.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as fusionauth from "@pulumi/fusionauth";
const example = fusionauth.getUser({
    username: "foo@example.com",
});
import pulumi
import pulumi_fusionauth as fusionauth
example = fusionauth.get_user(username="foo@example.com")
package main
import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/theogravity/pulumi-fusionauth/sdk/go/fusionauth"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := fusionauth.GetUser(ctx, &fusionauth.GetUserArgs{
			Username: pulumi.StringRef("foo@example.com"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Fusionauth = Pulumi.Fusionauth;
return await Deployment.RunAsync(() => 
{
    var example = Fusionauth.GetUser.Invoke(new()
    {
        Username = "foo@example.com",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.fusionauth.FusionauthFunctions;
import com.pulumi.fusionauth.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 = FusionauthFunctions.getUser(GetUserArgs.builder()
            .username("foo@example.com")
            .build());
    }
}
variables:
  example:
    fn::invoke:
      function: fusionauth:getUser
      arguments:
        username: foo@example.com
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(tenant_id: Optional[str] = None,
             user_id: Optional[str] = None,
             username: Optional[str] = None,
             opts: Optional[InvokeOptions] = None) -> GetUserResult
def get_user_output(tenant_id: Optional[pulumi.Input[str]] = None,
             user_id: Optional[pulumi.Input[str]] = None,
             username: Optional[pulumi.Input[str]] = None,
             opts: Optional[InvokeOptions] = None) -> Output[GetUserResult]func GetUser(ctx *Context, args *GetUserArgs, opts ...InvokeOption) (*GetUserResult, error)
func GetUserOutput(ctx *Context, args *GetUserOutputArgs, opts ...InvokeOption) GetUserResultOutput> Note: This function is named GetUser 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)
public static Output<GetUserResult> getUser(GetUserArgs args, InvokeOptions options)
fn::invoke:
  function: fusionauth:index/getUser:getUser
  arguments:
    # arguments dictionaryThe following arguments are supported:
getUser Result
The following output properties are available:
- Active bool
- True if the user is active. False if the user has been deactivated. Deactivated users will not be able to login.
- BirthDate string
- An ISO-8601 formatted date of the user’s birthdate such as YYYY-MM-DD.
- Data string
- A JSON serialised string that can hold any information about the user.
- Email string
- The user’s email address.
- Expiry int
- The expiration instant of the user’s account. An expired user is not permitted to login.
- FirstName string
- The first name of the user.
- FullName string
- The user’s full name.
- Id string
- The provider-assigned unique ID for this managed resource.
- ImageUrl string
- The URL that points to an image file that is the user’s profile image.
- LastName string
- The user’s last name.
- MiddleName string
- The user’s middle name.
- MobilePhone string
- The user’s mobile phone number.
- ParentEmail string
- The email address of the user’s parent or guardian.
- PasswordChange boolRequired 
- Indicates that the user’s password needs to be changed during their next login attempt.
- PreferredLanguages List<string>
- An array of locale strings that give, in order, the user’s preferred languages.
- TenantId string
- Timezone string
- The user’s preferred timezone.
- UserId string
- Username string
- UsernameStatus string
- The current status of the username. This is used if you are moderating usernames via CleanSpeak.
- Active bool
- True if the user is active. False if the user has been deactivated. Deactivated users will not be able to login.
- BirthDate string
- An ISO-8601 formatted date of the user’s birthdate such as YYYY-MM-DD.
- Data string
- A JSON serialised string that can hold any information about the user.
- Email string
- The user’s email address.
- Expiry int
- The expiration instant of the user’s account. An expired user is not permitted to login.
- FirstName string
- The first name of the user.
- FullName string
- The user’s full name.
- Id string
- The provider-assigned unique ID for this managed resource.
- ImageUrl string
- The URL that points to an image file that is the user’s profile image.
- LastName string
- The user’s last name.
- MiddleName string
- The user’s middle name.
- MobilePhone string
- The user’s mobile phone number.
- ParentEmail string
- The email address of the user’s parent or guardian.
- PasswordChange boolRequired 
- Indicates that the user’s password needs to be changed during their next login attempt.
- PreferredLanguages []string
- An array of locale strings that give, in order, the user’s preferred languages.
- TenantId string
- Timezone string
- The user’s preferred timezone.
- UserId string
- Username string
- UsernameStatus string
- The current status of the username. This is used if you are moderating usernames via CleanSpeak.
- active Boolean
- True if the user is active. False if the user has been deactivated. Deactivated users will not be able to login.
- birthDate String
- An ISO-8601 formatted date of the user’s birthdate such as YYYY-MM-DD.
- data String
- A JSON serialised string that can hold any information about the user.
- email String
- The user’s email address.
- expiry Integer
- The expiration instant of the user’s account. An expired user is not permitted to login.
- firstName String
- The first name of the user.
- fullName String
- The user’s full name.
- id String
- The provider-assigned unique ID for this managed resource.
- imageUrl String
- The URL that points to an image file that is the user’s profile image.
- lastName String
- The user’s last name.
- middleName String
- The user’s middle name.
- mobilePhone String
- The user’s mobile phone number.
- parentEmail String
- The email address of the user’s parent or guardian.
- passwordChange BooleanRequired 
- Indicates that the user’s password needs to be changed during their next login attempt.
- preferredLanguages List<String>
- An array of locale strings that give, in order, the user’s preferred languages.
- tenantId String
- timezone String
- The user’s preferred timezone.
- userId String
- username String
- usernameStatus String
- The current status of the username. This is used if you are moderating usernames via CleanSpeak.
- active boolean
- True if the user is active. False if the user has been deactivated. Deactivated users will not be able to login.
- birthDate string
- An ISO-8601 formatted date of the user’s birthdate such as YYYY-MM-DD.
- data string
- A JSON serialised string that can hold any information about the user.
- email string
- The user’s email address.
- expiry number
- The expiration instant of the user’s account. An expired user is not permitted to login.
- firstName string
- The first name of the user.
- fullName string
- The user’s full name.
- id string
- The provider-assigned unique ID for this managed resource.
- imageUrl string
- The URL that points to an image file that is the user’s profile image.
- lastName string
- The user’s last name.
- middleName string
- The user’s middle name.
- mobilePhone string
- The user’s mobile phone number.
- parentEmail string
- The email address of the user’s parent or guardian.
- passwordChange booleanRequired 
- Indicates that the user’s password needs to be changed during their next login attempt.
- preferredLanguages string[]
- An array of locale strings that give, in order, the user’s preferred languages.
- tenantId string
- timezone string
- The user’s preferred timezone.
- userId string
- username string
- usernameStatus string
- The current status of the username. This is used if you are moderating usernames via CleanSpeak.
- active bool
- True if the user is active. False if the user has been deactivated. Deactivated users will not be able to login.
- birth_date str
- An ISO-8601 formatted date of the user’s birthdate such as YYYY-MM-DD.
- data str
- A JSON serialised string that can hold any information about the user.
- email str
- The user’s email address.
- expiry int
- The expiration instant of the user’s account. An expired user is not permitted to login.
- first_name str
- The first name of the user.
- full_name str
- The user’s full name.
- id str
- The provider-assigned unique ID for this managed resource.
- image_url str
- The URL that points to an image file that is the user’s profile image.
- last_name str
- The user’s last name.
- middle_name str
- The user’s middle name.
- mobile_phone str
- The user’s mobile phone number.
- parent_email str
- The email address of the user’s parent or guardian.
- password_change_ boolrequired 
- Indicates that the user’s password needs to be changed during their next login attempt.
- preferred_languages Sequence[str]
- An array of locale strings that give, in order, the user’s preferred languages.
- tenant_id str
- timezone str
- The user’s preferred timezone.
- user_id str
- username str
- username_status str
- The current status of the username. This is used if you are moderating usernames via CleanSpeak.
- active Boolean
- True if the user is active. False if the user has been deactivated. Deactivated users will not be able to login.
- birthDate String
- An ISO-8601 formatted date of the user’s birthdate such as YYYY-MM-DD.
- data String
- A JSON serialised string that can hold any information about the user.
- email String
- The user’s email address.
- expiry Number
- The expiration instant of the user’s account. An expired user is not permitted to login.
- firstName String
- The first name of the user.
- fullName String
- The user’s full name.
- id String
- The provider-assigned unique ID for this managed resource.
- imageUrl String
- The URL that points to an image file that is the user’s profile image.
- lastName String
- The user’s last name.
- middleName String
- The user’s middle name.
- mobilePhone String
- The user’s mobile phone number.
- parentEmail String
- The email address of the user’s parent or guardian.
- passwordChange BooleanRequired 
- Indicates that the user’s password needs to be changed during their next login attempt.
- preferredLanguages List<String>
- An array of locale strings that give, in order, the user’s preferred languages.
- tenantId String
- timezone String
- The user’s preferred timezone.
- userId String
- username String
- usernameStatus String
- The current status of the username. This is used if you are moderating usernames via CleanSpeak.
Package Details
- Repository
- fusionauth theogravity/pulumi-fusionauth
- License
- MIT
- Notes
- This Pulumi package is based on the fusionauthTerraform Provider.