User

With this resource, you can manage user identities, including resetting passwords, and creating, provisioning, blocking, and deleting users.

Example Usage

using Pulumi;
using Auth0 = Pulumi.Auth0;

class MyStack : Stack
{
    public MyStack()
    {
        var admin = new Auth0.Role("admin", new Auth0.RoleArgs
        {
            Description = "Administrator",
        });
        var user = new Auth0.User("user", new Auth0.UserArgs
        {
            ConnectionName = "Username-Password-Authentication",
            UserId = "12345",
            Username = "unique_username",
            GivenName = "Firstname",
            FamilyName = "Lastname",
            Nickname = "some.nickname",
            Email = "test@test.com",
            EmailVerified = true,
            Password = "passpass$12$12",
            Roles = 
            {
                admin.Id,
            },
        });
    }

}

Coming soon!

import pulumi
import pulumi_auth0 as auth0

admin = auth0.Role("admin", description="Administrator")
user = auth0.User("user",
    connection_name="Username-Password-Authentication",
    user_id="12345",
    username="unique_username",
    given_name="Firstname",
    family_name="Lastname",
    nickname="some.nickname",
    email="test@test.com",
    email_verified=True,
    password="passpass$12$12",
    roles=[admin.id])
import * as pulumi from "@pulumi/pulumi";
import * as auth0 from "@pulumi/auth0";

const admin = new auth0.Role("admin", {description: "Administrator"});
const user = new auth0.User("user", {
    connectionName: "Username-Password-Authentication",
    userId: "12345",
    username: "unique_username",
    givenName: "Firstname",
    familyName: "Lastname",
    nickname: "some.nickname",
    email: "test@test.com",
    emailVerified: true,
    password: `passpass$12$12`,
    roles: [admin.id],
});

Create a User Resource

new User(name: string, args: UserArgs, opts?: CustomResourceOptions);
def User(resource_name, opts=None, app_metadata=None, blocked=None, connection_name=None, email=None, email_verified=None, family_name=None, given_name=None, name=None, nickname=None, password=None, phone_number=None, phone_verified=None, picture=None, roles=None, user_id=None, user_metadata=None, username=None, verify_email=None, __props__=None);
func NewUser(ctx *Context, name string, args UserArgs, opts ...ResourceOption) (*User, error)
public User(string name, UserArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args UserArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args UserArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args UserArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

User Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The User resource accepts the following input properties:

ConnectionName string

String. Name of the connection from which the user information was sourced.

AppMetadata string

String, JSON format. Custom fields that store info about the user that impact the user’s core functionality, such as how an application functions or what the user can access. Examples include support plans and IDs for external accounts.

Blocked bool
Email string

String. Email address of the user.

EmailVerified bool

Boolean. Indicates whether or not the email address has been verified.

FamilyName string
GivenName string
Name string
Nickname string

String. Preferred nickname or alias of the user.

Password string

String, Case-sensitive. Initial password for this user. Used for non-SMS connections.

PhoneNumber string

String. Phone number for the user; follows the E.164 recommendation. Used for SMS connections.

PhoneVerified bool

Boolean. Indicates whether or not the phone number has been verified.

Picture string
Roles List<string>

Set(String). Set of IDs of roles assigned to the user.

UserId string

String. ID of the user.

UserMetadata string

String, JSON format. Custom fields that store info about the user that does not impact a user’s core functionality. Examples include work address, home address, and user preferences.

Username string

String. Username of the user. Only valid if the connection requires a username.

VerifyEmail bool

Boolean. Indicates whether or not the user will receive a verification email after creation. Overrides behavior of email_verified parameter.

ConnectionName string

String. Name of the connection from which the user information was sourced.

AppMetadata string

String, JSON format. Custom fields that store info about the user that impact the user’s core functionality, such as how an application functions or what the user can access. Examples include support plans and IDs for external accounts.

Blocked bool
Email string

String. Email address of the user.

EmailVerified bool

Boolean. Indicates whether or not the email address has been verified.

FamilyName string
GivenName string
Name string
Nickname string

String. Preferred nickname or alias of the user.

Password string

String, Case-sensitive. Initial password for this user. Used for non-SMS connections.

PhoneNumber string

String. Phone number for the user; follows the E.164 recommendation. Used for SMS connections.

PhoneVerified bool

Boolean. Indicates whether or not the phone number has been verified.

Picture string
Roles []string

Set(String). Set of IDs of roles assigned to the user.

UserId string

String. ID of the user.

UserMetadata string

String, JSON format. Custom fields that store info about the user that does not impact a user’s core functionality. Examples include work address, home address, and user preferences.

Username string

String. Username of the user. Only valid if the connection requires a username.

VerifyEmail bool

Boolean. Indicates whether or not the user will receive a verification email after creation. Overrides behavior of email_verified parameter.

connectionName string

String. Name of the connection from which the user information was sourced.

appMetadata string

String, JSON format. Custom fields that store info about the user that impact the user’s core functionality, such as how an application functions or what the user can access. Examples include support plans and IDs for external accounts.

blocked boolean
email string

String. Email address of the user.

emailVerified boolean

Boolean. Indicates whether or not the email address has been verified.

familyName string
givenName string
name string
nickname string

String. Preferred nickname or alias of the user.

password string

String, Case-sensitive. Initial password for this user. Used for non-SMS connections.

phoneNumber string

String. Phone number for the user; follows the E.164 recommendation. Used for SMS connections.

phoneVerified boolean

Boolean. Indicates whether or not the phone number has been verified.

picture string
roles string[]

Set(String). Set of IDs of roles assigned to the user.

userId string

String. ID of the user.

userMetadata string

String, JSON format. Custom fields that store info about the user that does not impact a user’s core functionality. Examples include work address, home address, and user preferences.

username string

String. Username of the user. Only valid if the connection requires a username.

verifyEmail boolean

Boolean. Indicates whether or not the user will receive a verification email after creation. Overrides behavior of email_verified parameter.

connection_name str

String. Name of the connection from which the user information was sourced.

app_metadata str

String, JSON format. Custom fields that store info about the user that impact the user’s core functionality, such as how an application functions or what the user can access. Examples include support plans and IDs for external accounts.

blocked bool
email str

String. Email address of the user.

email_verified bool

Boolean. Indicates whether or not the email address has been verified.

family_name str
given_name str
name str
nickname str

String. Preferred nickname or alias of the user.

password str

String, Case-sensitive. Initial password for this user. Used for non-SMS connections.

phone_number str

String. Phone number for the user; follows the E.164 recommendation. Used for SMS connections.

phone_verified bool

Boolean. Indicates whether or not the phone number has been verified.

picture str
roles List[str]

Set(String). Set of IDs of roles assigned to the user.

user_id str

String. ID of the user.

user_metadata str

String, JSON format. Custom fields that store info about the user that does not impact a user’s core functionality. Examples include work address, home address, and user preferences.

username str

String. Username of the user. Only valid if the connection requires a username.

verify_email bool

Boolean. Indicates whether or not the user will receive a verification email after creation. Overrides behavior of email_verified parameter.

Outputs

All input properties are implicitly available as output properties. Additionally, the User resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing User Resource

Get an existing User resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: UserState, opts?: CustomResourceOptions): User
static get(resource_name, id, opts=None, app_metadata=None, blocked=None, connection_name=None, email=None, email_verified=None, family_name=None, given_name=None, name=None, nickname=None, password=None, phone_number=None, phone_verified=None, picture=None, roles=None, user_id=None, user_metadata=None, username=None, verify_email=None, __props__=None);
func GetUser(ctx *Context, name string, id IDInput, state *UserState, opts ...ResourceOption) (*User, error)
public static User Get(string name, Input<string> id, UserState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

AppMetadata string

String, JSON format. Custom fields that store info about the user that impact the user’s core functionality, such as how an application functions or what the user can access. Examples include support plans and IDs for external accounts.

Blocked bool
ConnectionName string

String. Name of the connection from which the user information was sourced.

Email string

String. Email address of the user.

EmailVerified bool

Boolean. Indicates whether or not the email address has been verified.

FamilyName string
GivenName string
Name string
Nickname string

String. Preferred nickname or alias of the user.

Password string

String, Case-sensitive. Initial password for this user. Used for non-SMS connections.

PhoneNumber string

String. Phone number for the user; follows the E.164 recommendation. Used for SMS connections.

PhoneVerified bool

Boolean. Indicates whether or not the phone number has been verified.

Picture string
Roles List<string>

Set(String). Set of IDs of roles assigned to the user.

UserId string

String. ID of the user.

UserMetadata string

String, JSON format. Custom fields that store info about the user that does not impact a user’s core functionality. Examples include work address, home address, and user preferences.

Username string

String. Username of the user. Only valid if the connection requires a username.

VerifyEmail bool

Boolean. Indicates whether or not the user will receive a verification email after creation. Overrides behavior of email_verified parameter.

AppMetadata string

String, JSON format. Custom fields that store info about the user that impact the user’s core functionality, such as how an application functions or what the user can access. Examples include support plans and IDs for external accounts.

Blocked bool
ConnectionName string

String. Name of the connection from which the user information was sourced.

Email string

String. Email address of the user.

EmailVerified bool

Boolean. Indicates whether or not the email address has been verified.

FamilyName string
GivenName string
Name string
Nickname string

String. Preferred nickname or alias of the user.

Password string

String, Case-sensitive. Initial password for this user. Used for non-SMS connections.

PhoneNumber string

String. Phone number for the user; follows the E.164 recommendation. Used for SMS connections.

PhoneVerified bool

Boolean. Indicates whether or not the phone number has been verified.

Picture string
Roles []string

Set(String). Set of IDs of roles assigned to the user.

UserId string

String. ID of the user.

UserMetadata string

String, JSON format. Custom fields that store info about the user that does not impact a user’s core functionality. Examples include work address, home address, and user preferences.

Username string

String. Username of the user. Only valid if the connection requires a username.

VerifyEmail bool

Boolean. Indicates whether or not the user will receive a verification email after creation. Overrides behavior of email_verified parameter.

appMetadata string

String, JSON format. Custom fields that store info about the user that impact the user’s core functionality, such as how an application functions or what the user can access. Examples include support plans and IDs for external accounts.

blocked boolean
connectionName string

String. Name of the connection from which the user information was sourced.

email string

String. Email address of the user.

emailVerified boolean

Boolean. Indicates whether or not the email address has been verified.

familyName string
givenName string
name string
nickname string

String. Preferred nickname or alias of the user.

password string

String, Case-sensitive. Initial password for this user. Used for non-SMS connections.

phoneNumber string

String. Phone number for the user; follows the E.164 recommendation. Used for SMS connections.

phoneVerified boolean

Boolean. Indicates whether or not the phone number has been verified.

picture string
roles string[]

Set(String). Set of IDs of roles assigned to the user.

userId string

String. ID of the user.

userMetadata string

String, JSON format. Custom fields that store info about the user that does not impact a user’s core functionality. Examples include work address, home address, and user preferences.

username string

String. Username of the user. Only valid if the connection requires a username.

verifyEmail boolean

Boolean. Indicates whether or not the user will receive a verification email after creation. Overrides behavior of email_verified parameter.

app_metadata str

String, JSON format. Custom fields that store info about the user that impact the user’s core functionality, such as how an application functions or what the user can access. Examples include support plans and IDs for external accounts.

blocked bool
connection_name str

String. Name of the connection from which the user information was sourced.

email str

String. Email address of the user.

email_verified bool

Boolean. Indicates whether or not the email address has been verified.

family_name str
given_name str
name str
nickname str

String. Preferred nickname or alias of the user.

password str

String, Case-sensitive. Initial password for this user. Used for non-SMS connections.

phone_number str

String. Phone number for the user; follows the E.164 recommendation. Used for SMS connections.

phone_verified bool

Boolean. Indicates whether or not the phone number has been verified.

picture str
roles List[str]

Set(String). Set of IDs of roles assigned to the user.

user_id str

String. ID of the user.

user_metadata str

String, JSON format. Custom fields that store info about the user that does not impact a user’s core functionality. Examples include work address, home address, and user preferences.

username str

String. Username of the user. Only valid if the connection requires a username.

verify_email bool

Boolean. Indicates whether or not the user will receive a verification email after creation. Overrides behavior of email_verified parameter.

Package Details

Repository
https://github.com/pulumi/pulumi-auth0
License
Apache-2.0
Notes
This Pulumi package is based on the auth0 Terraform Provider.