Data Source: azuread_service_principals

Gets basic information for multiple Azure Active Directory service principals.

API Permissions

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

When authenticated with a service principal, this data source requires one of the following application roles: Application.Read.All or Directory.Read.All

When authenticated with a user principal, this data source does not require any additional roles.

Example Usage

Look up by application display names

data "azuread_service_principals" "example" {
  display_names = [
    "example-app",
    "another-app",
  ]
}

Look up by application IDs (client IDs)

data "azuread_service_principals" "example" {
  client_ids = [
    "11111111-0000-0000-0000-000000000000",
    "22222222-0000-0000-0000-000000000000",
    "33333333-0000-0000-0000-000000000000",
  ]
}

Look up by service principal object IDs

data "azuread_service_principals" "example" {
  object_ids = [
    "00000000-0000-0000-0000-000000000000",
    "00000000-0000-0000-0000-111111111111",
    "00000000-0000-0000-0000-222222222222",
  ]
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:


service_principal object exports the following: