An Azure service that provides a general-purpose, serverless container platform.
Hello @Pas, Mike
Based on the troubleshooting you've already completed, I agree that this no longer looks like a normal Key Vault RBAC, Terraform, or client-side configuration issue.
Microsoft's documented requirements for a Key Vault reference in Azure Container Apps are essentially:
- The managed identity must be assigned to the Container App.
- That identity must have permission to read the secret; with Key Vault RBAC, Microsoft recommends the Key Vault Secrets User role.
- The Key Vault secret URI and identity reference must be valid.
- Network connectivity to Key Vault must be available.
You've already validated those points and, more importantly, reproduced the same control-plane error through Terraform, Azure Portal, and az containerapp secret set. That makes a Terraform/AzAPI implementation problem unlikely.
One thing to verify before escalating is the deployment dependency/order around the Key Vault private endpoint and private DNS configuration. Explicitly making the Container App depend on the private endpoint resolved that deployment.
If the private endpoint/DNS resources already exist independently and this still fails hours later, however, deployment ordering wouldn't explain the persistent failure.
At that point, treat this as a likely Azure Container Apps resource-provider/control-plane issue and open an Azure support case. Include:
- Container App resource ID and Container Apps Environment resource ID.
- UAMI resource ID and principalId.
- Key Vault resource ID and secret URI (without exposing the secret value).
- The Key Vault Secrets User role assignment details.
- Exact timestamps and correlation/activity IDs from failed deployments.
- Confirmation that the same operation fails through Portal, CLI, and ARM/AzAPI.
- Confirmation that private DNS resolves the vault through its private endpoint from the Container Apps environment.
Don't keep recreating the RBAC assignment. Since the same assignment existed long-term before being recreated and the failure persists across independent API paths, repeatedly changing RBAC is unlikely to provide useful additional evidence.
As a diagnostic test, if your security requirements permit it temporarily, you could create a separate test Key Vault without private-endpoint restrictions, grant the same UAMI Key Vault Secrets User, and reference a disposable test secret. If that works, you've isolated the problem to the private networking/control-plane path. If it produces the identical failure, that gives Microsoft stronger evidence of an ACA identity/secret-reference validation problem.
Microsoft's current Container Apps documentation also has a dedicated troubleshooting section for Key Vault references covering managed identity, identity assignment, disabled secrets, authentication, and RBAC failures. Your testing appears to have already gone beyond those documented customer-side causes.
So I think your suspicion is reasonable: if the private endpoint is fully established and DNS/connectivity are confirmed, this warrants Microsoft investigation rather than more Terraform or RBAC changes.
Sharing these references with you:
Manage secrets in Azure Container Apps
Azure CLI – az containerapp secret
Help make this community better for everyone: if this answer resolved your issue, please accept it or leave an upvote. If not, share more details in a comment so we can continue the discussion and find the right solution.