» azuread_user

Manages a User within Azure Active Directory.

» Example Usage

resource "azuread_user" "example" {
  user_principal_name = "jdo@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.

» Attributes Reference

The following attributes are exported:

  • object_id - The Object ID of the Azure AD User.
  • id - The Object ID of the Azure AD User.
  • mail - The primary email address of the Azure AD User.

» 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