» azuread_user

Manages a User within Azure Active Directory.

» Example Usage

resource "azuread_user" "example" {
  user_principal_name = "jdoe@hashicorp.com"
  display_name        = "J. Doe"
  mail_nickname       = "jdoe"
  password            = "SecretP@sswd99!"
}

» Argument Reference

The following arguments are supported:

  • user_principal_name - (Required) The User Principal Name of the Azure AD User.
  • display_name - (Required) The name to display in the address book for the user.
  • account_enabled - (Optional) true if the account should be enabled, otherwise false. Defaults to true.
  • mail_nickname- (Optional) The mail alias for the user. Defaults to the user name part of the User Principal Name.
  • password - (Required) The password for the User. The password must satisfy minimum requirements as specified by the password policy. The maximum length is 256 characters.
  • force_password_change - (Optional) true if the User is forced to change the password during the next sign-in. Defaults to false.
  • immutable_id - (Optional) 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.
  • usage_location - (Optional) 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.

» Attributes Reference

The following attributes are exported:

» Import

Azure Active Directory Users can be imported using the object id, e.g.

terraform import azuread_user.my_user 00000000-0000-0000-0000-000000000000