Resource: azuread_invitation

Manages an invitation of a guest user within Azure Active Directory.

API Permissions

The following API permissions are required in order to use this resource.

When authenticated with a service principal, this resource requires one of the following application roles: User.Invite.All, User.ReadWrite.All or Directory.ReadWrite.All

When authenticated with a user principal, this resource requires one of the following directory roles: Guest Inviter, User Administrator or Global Administrator

Example Usage

Basic example

resource "azuread_invitation" "example" {
  user_email_address = "jdoe@hashicorp.com"
  redirect_url       = "https://portal.azure.com"
}

Invitation with standard message

resource "azuread_invitation" "example" {
  user_email_address = "jdoe@hashicorp.com"
  redirect_url       = "https://portal.azure.com"

  message {
    language = "en-US"
  }
}

Invitation with custom message body and an additional recipient

resource "azuread_invitation" "example" {
  user_display_name  = "Bob Bobson"
  user_email_address = "bbobson@hashicorp.com"
  redirect_url       = "https://portal.azure.com"

  message {
    additional_recipients = ["aaliceberg@hashicorp.com"]
    body                  = "Hello there! You are invited to join my Azure tenant!"
  }
}

Argument Reference

The following arguments are supported:


message block supports the following:

Attributes Reference

In addition to all arguments above, the following attributes are exported:

Import

This resource does not support importing.