Class User
Manages a User within Azure Active Directory.
NOTE: If you're authenticating using a Service Principal then it must have permissions to
Directory.ReadWrite.Allwithin theWindows Azure Active DirectoryAPI.
Example Usage
using Pulumi;
using AzureAD = Pulumi.AzureAD;
class MyStack : Stack
{
public MyStack()
{
var example = new AzureAD.User("example", new AzureAD.UserArgs
{
DisplayName = "J. Doe",
MailNickname = "jdoe",
Password = "SecretP@sswd99!",
UserPrincipalName = "jdo@hashicorp.com",
});
}
}
Inherited Members
Namespace: Pulumi.AzureAD
Assembly: Pulumi.AzureAD.dll
Syntax
public class User : CustomResource
Constructors
View SourceUser(String, UserArgs, CustomResourceOptions)
Create a User resource with the given unique name, arguments, and options.
Declaration
public User(string name, UserArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| UserArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAccountEnabled
true if the account should be enabled, otherwise false. Defaults to true.
Declaration
public Output<bool?> AccountEnabled { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
DisplayName
The name to display in the address book for the user.
Declaration
public Output<string> DisplayName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ForcePasswordChange
true if the User is forced to change the password during the next sign-in. Defaults to false.
Declaration
public Output<bool?> ForcePasswordChange { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
ImmutableId
The value used to associate an on-premises Active Directory user account with their Azure AD user object. This must be specified if you are using a federated domain for the user's userPrincipalName (UPN) property when creating a new user account.
Declaration
public Output<string> ImmutableId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
The primary email address of the Azure AD User.
Declaration
public Output<string> Mail { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
MailNickname
The mail alias for the user. Defaults to the user name part of the User Principal Name.
Declaration
public Output<string> MailNickname { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ObjectId
The Object ID of the Azure AD User.
Declaration
public Output<string> ObjectId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
OnpremisesSamAccountName
The on premise sam account name of the Azure AD User.
Declaration
public Output<string> OnpremisesSamAccountName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
OnpremisesUserPrincipalName
The on premise user principal name of the Azure AD User.
Declaration
public Output<string> OnpremisesUserPrincipalName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Password
The password for the User. The password must satisfy minimum requirements as specified by the password policy. The maximum length is 256 characters.
Declaration
public Output<string> Password { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
UsageLocation
The usage location of the User. Required for users that will be assigned licenses due to legal requirement to check for availability of services in countries. The usage location is a two letter country code (ISO standard 3166). Examples include: NO, JP, and GB. Cannot be reset to null once set.
Declaration
public Output<string> UsageLocation { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
UserPrincipalName
The User Principal Name of the Azure AD User.
Declaration
public Output<string> UserPrincipalName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, UserState, CustomResourceOptions)
Get an existing User resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static User Get(string name, Input<string> id, UserState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| UserState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| User |