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);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:
- Connection
Name string String. Name of the connection from which the user information was sourced.
- App
Metadata 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.
- Email
Verified bool Boolean. Indicates whether or not the email address has been verified.
- Family
Name string - Given
Name 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.
- Phone
Number string 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 string
- Roles List<string>
Set(String). Set of IDs of roles assigned to the user.
- User
Id string String. ID of the user.
- User
Metadata 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.
- Verify
Email bool Boolean. Indicates whether or not the user will receive a verification email after creation. Overrides behavior of
email_verifiedparameter.
- Connection
Name string String. Name of the connection from which the user information was sourced.
- App
Metadata 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.
- Email
Verified bool Boolean. Indicates whether or not the email address has been verified.
- Family
Name string - Given
Name 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.
- Phone
Number string 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 string
- Roles []string
Set(String). Set of IDs of roles assigned to the user.
- User
Id string String. ID of the user.
- User
Metadata 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.
- Verify
Email bool Boolean. Indicates whether or not the user will receive a verification email after creation. Overrides behavior of
email_verifiedparameter.
- connection
Name string String. Name of the connection from which the user information was sourced.
- app
Metadata 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.
- email
Verified boolean Boolean. Indicates whether or not the email address has been verified.
- family
Name string - given
Name 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.
- phone
Number string String. Phone number for the user; follows the E.164 recommendation. Used for SMS connections.
- phone
Verified 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.
- user
Id string String. ID of the user.
- user
Metadata 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.
- verify
Email boolean Boolean. Indicates whether or not the user will receive a verification email after creation. Overrides behavior of
email_verifiedparameter.
- 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_verifiedparameter.
Outputs
All input properties are implicitly available as output properties. Additionally, the User resource produces the following output properties:
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): Userstatic 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);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:
- App
Metadata 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
- Connection
Name string String. Name of the connection from which the user information was sourced.
- Email string
String. Email address of the user.
- Email
Verified bool Boolean. Indicates whether or not the email address has been verified.
- Family
Name string - Given
Name 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.
- Phone
Number string 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 string
- Roles List<string>
Set(String). Set of IDs of roles assigned to the user.
- User
Id string String. ID of the user.
- User
Metadata 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.
- Verify
Email bool Boolean. Indicates whether or not the user will receive a verification email after creation. Overrides behavior of
email_verifiedparameter.
- App
Metadata 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
- Connection
Name string String. Name of the connection from which the user information was sourced.
- Email string
String. Email address of the user.
- Email
Verified bool Boolean. Indicates whether or not the email address has been verified.
- Family
Name string - Given
Name 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.
- Phone
Number string 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 string
- Roles []string
Set(String). Set of IDs of roles assigned to the user.
- User
Id string String. ID of the user.
- User
Metadata 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.
- Verify
Email bool Boolean. Indicates whether or not the user will receive a verification email after creation. Overrides behavior of
email_verifiedparameter.
- app
Metadata 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
- connection
Name string String. Name of the connection from which the user information was sourced.
- email string
String. Email address of the user.
- email
Verified boolean Boolean. Indicates whether or not the email address has been verified.
- family
Name string - given
Name 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.
- phone
Number string String. Phone number for the user; follows the E.164 recommendation. Used for SMS connections.
- phone
Verified 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.
- user
Id string String. ID of the user.
- user
Metadata 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.
- verify
Email boolean Boolean. Indicates whether or not the user will receive a verification email after creation. Overrides behavior of
email_verifiedparameter.
- 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_verifiedparameter.
Package Details
- Repository
- https://github.com/pulumi/pulumi-auth0
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
auth0Terraform Provider.