I am trying to create a new Enterprise App with Terraform i Azure. Everytime I am ending with an app created, but then when going into a Provisioning, I got an error saying "Out of the box automatic provisioning to app_name_here is not supported today".
What I am missing in my code? What actually makes this SCIM part available to provision? I don't need the provisioning details in TF code, I want only create and app with TF, which later I am able to provision manually, without that error I pasted. Here is my code
data "azurerm_client_config" "main" {}
resource "azuread_application" "enterprise_app" {
display_name = "enterprise_app"
feature_tags {
custom_single_sign_on = true
}
owners = setsubtract(
local.owners,
[
local.managers.xxxxx,
local.managers.xxxxx,
]
)
web {
redirect_uris = [
"https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/client/oauth2/authorize",
]
implicit_grant {
access_token_issuance_enabled = false
id_token_issuance_enabled = false
}
}
}
resource "azuread_service_principal" "enterprise_app" {
application_id = azuread_application.enterprise_app.application_id
owners = azuread_application.enterprise_app.owners
login_url = "https://axxxxxxxxxxx/auth/login"
feature_tags {
custom_single_sign_on = true
enterprise = true
gallery = false
}
}
resource "azuread_synchronization_secret" "enterprise_app" {
service_principal_id = azuread_service_principal.enterprise_app.id
credential {
key = "BaseAddress"
value = "https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxapi/v1/scim/"
}
credential {
key = "SecretToken"
value = "abcdefghijaksl"
}
}
resource "azuread_synchronization_job" "enterprise_app" {
service_principal_id = azuread_service_principal.enterprise_app.id
template_id = "scim"
enabled = true
}
If you want to use Terraform to build an Enterprise Application in Azure that can be provisioned manually later without getting the error "Out of the box automatic provisioning to app_name_here is not supported today".
Before we can solve your problem, we need to know what the error message means. This error usually means that your Enterprise Application does not have the right settings for automatic provisioning. This might be because the SCIM (System for Cross-domain Identity Management) configuration is missing or wrong. SCIM is very important for creating and managing users.
For demo purpose, I tried using the terraform code below
Terraform configuration:
The respective place needs to be replaced
Your_SCIM_Endpoint_URLandYour_SCIM_Secretwith your actual SCIM endpoint and secret token.Many cloud applications already support SCIM and provide SCIM endpoints out of the box. If you're integrating with such a service, they will provide you with the SCIM endpoint URL and a secret token.
Output: