» Data Source: azuread_application

Use this data source to access information about an existing Application within Azure Active Directory.

» Example Usage

data "azuread_application" "example" {
  name = "My First AzureAD Application"
}

output "azure_ad_object_id" {
  value = data.azuread_application.example.id
}

» Argument Reference

  • object_id - (Optional) Specifies the Object ID of the Application within Azure Active Directory.

  • application_id - (Optional) Specifies the Application ID of the Azure Active Directory Application.

  • name - (Optional) Specifies the name of the Application within Azure Active Directory.

» Attributes Reference

The following attributes are exported:


required_resource_access block exports the following:

  • resource_app_id - The unique identifier for the resource that the application requires access to.

  • resource_access - A collection of resource_access blocks as documented below


resource_access block exports the following:

  • id - The unique identifier for one of the OAuth2Permission or AppRole instances that the resource application exposes.

  • type - Specifies whether the id property references an OAuth2Permission or an AppRole.


access_token and/or id_token blocks export the following:

  • name - The name of the optional claim.
  • source - The source of the claim. If source is absent, the claim is a predefined optional claim. If source is user, the value of name is the extension property from the user object.
  • essential - Whether the claim specified by the client is necessary to ensure a smooth authorization experience.
  • additional_properties - List of Additional Properties of the claim. If a property exists in this list, it modifies the behaviour of the optional claim.

oauth2_permission block exports the following:


app_role block exports the following:

  • id - The unique identifier of the app_role.

  • allowed_member_types - Specifies whether this app role definition can be assigned to users and groups, or to other applications (that are accessing this application in daemon service scenarios). Possible values are: User and Application, or both.

  • description - Permission help text that appears in the admin app assignment and consent experiences.

  • display_name - Display name for the permission that appears in the admin consent and app assignment experiences.

  • is_enabled - Determines if the app role is enabled.

  • value - Specifies the value of the roles claim that the application should expect in the authentication and access tokens.