» Data Source: azuread_service_principal

Gets information about an existing Service Principal associated with an Application within Azure Active Directory.

» Example Usage (by Application Display Name)

data "azuread_service_principal" "example" {
  display_name = "my-awesome-application"

» Example Usage (by Application ID)

data "azuread_service_principal" "example" {
  application_id = "00000000-0000-0000-0000-000000000000"

» Example Usage (by Object ID)

data "azuread_service_principal" "example" {
  object_id = "00000000-0000-0000-0000-000000000000"

» Argument Reference

The following arguments are supported:

  • application_id - (Optional) The ID of the Azure AD Application.

  • object_id - (Optional) The ID of the Azure AD Service Principal.

  • display_name - (Optional) The Display Name of the Azure AD Application associated with this Service Principal.

» Attributes Reference

The following attributes are exported:

  • id - The Object ID for the Service Principal.

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.