Terraform Cloud, create azure application error

Hello, I’m new into terraform, and tried the terraform cloud solution.

I had an issue during the azuread_application resource creation:

the following code is working on terraform when executed on local:

resource “azuread_application” “service_connection” {
display_name = local.azad_service_connection_sp_name

resource “azuread_service_principal” “service_connection” {
application_id = azuread_application.service_connection.application_id

resource “azuread_service_principal_password” “service_connection” {
service_principal_id = azuread_service_principal.service_connection.id

but when this code is executed remotely with terraform cloud, this error occurs:

Error: Could not create application

│ with azuread_application.service_connection,
│ on azuread.tf line 11, in resource “azuread_application” “service_connection”:
│ 11: resource “azuread_application” “service_connection” {

│ ApplicationsClient.BaseClient.Post(): unexpected status 403 with OData
│ error: Authorization_RequestDenied: Insufficient privileges to complete the
│ operation.

If i understand correctly, I saw there is a possibility to use sso to autorize terraform cloud with azure ad, but this is accessible only with a business terraform cloud subscription.

Is there is another way to create an azure ad application with terraform cloud ?

1 Like

I am facing the same problem