An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
The safest recovery is to leave the running WAF_v2 gateway in place, identify and correct the first failed control-plane operation, and only then issue a new configuration PUT to restore provisioningState to Succeeded.
Resource Health: Available and operationalState: Running can coexist with provisioningState: Failed: the latter records that the most recent management-plane update failed, while the existing deployed configuration can continue serving traffic.^1^
1. Find the original failure
In the Azure portal:
- Open Application Gateway → Activity log.
- Filter:
- Resource: the affected gateway
- Status:
Failed - Time range: when the first update failed
- Open the first failed operation, not the later reapply attempts; later failures can be cascading effects.
- In JSON, record:
-
statusMessage - error code and detailed message
-
correlationId - operation timestamp
-
- Check Change history for changes made approximately 30 minutes before or after that operation.^2^
A read-only CLI check can confirm that the data-plane and control-plane states differ:
az network application-gateway show \
--name "<gateway-name>" \
--resource-group "<resource-group>" \
--subscription "<subscription-id>" \
--query "{provisioningState:provisioningState,
operationalState:operationalState,
sku:sku.tier}" \
--output json
If it reports operationalState: Running with provisioningState: Failed, do not stop or delete the gateway while investigating. Neither action is required to repair the failed provisioning metadata.
2. Correct the condition named in statusMessage
Because the subnet has no NSG or custom UDR, those common causes do not need to be revisited unless the Activity Log explicitly reports a subnet or routing error. Concentrate on the error returned by the first failed operation:
-
ApplicationGatewayKeyVaultSecretExceptionorLinkedAccessCheckFailed
Check that the gateway’s user-assigned identity still exists and has secretGetaccess; the referenced vault, certificate, and secret still exist and are enabled; and Key Vault firewall/private-endpoint DNS configuration permits resolution and access.^2^ -
InvalidResourceReference, orInternalServerErrornaming a listener, path map, backend pool, or HTTP setting
Look for an orphaned reference—for example, a routing rule that still points to an object removed by an earlier deployment. Recreate the missing object or update the dependent configuration together in one deployment.^3^ -
AuthorizationFailed,ScopeLocked, orOperationNotAllowed
Correct the reported RBAC or resource-lock condition. Application Gateway troubleshooting requires appropriate write permissions; subnet changes additionally require network permissions.^3^ - Generic
Internal Server Errorwith no actionable component
Do not keep submitting configuration changes. Escalate with the timestamp andcorrelationIdfrom the failed Activity Log event.^2^
3. Reapply only after correcting the cause
Since reapplying the unchanged configuration has already failed, repeating it before addressing the original error is unlikely to recover the gateway. After the underlying condition is corrected, issue a full Get-and-Set PUT:
Connect-AzAccount
$gateway = Get-AzApplicationGateway `
-Name "<gateway-name>" `
-ResourceGroupName "<resource-group>"
$gateway | Set-AzApplicationGateway
Review pending configuration before running this write operation. Always retrieve the current object first: running Set-AzApplicationGateway without Get-AzApplicationGateway, or using an older API/tool, can overwrite settings with defaults or omit properties.^1^
Then rerun the CLI state query. The expected result is:
-
provisioningState: Succeeded -
operationalState: Running
A no-op PUT often clears a transient failed state, but if it returns to Failed, Microsoft’s guidance is to treat the current configuration or one of its dependencies as invalid rather than repeatedly retrying.^4^
4. Escalation criteria
Open an Azure support request without stopping or recreating the gateway when:
- the detailed error remains only
ApplicationGatewayErrorApplyingConfigurationorInternalServerError; - no invalid dependency is identified;
- the corrected configuration PUT still fails; or
- the resource remains
Updatingfor an extended period.
Include the first failed operation’s timestamp, correlationId, full statusMessage, gateway resource ID, region, and confirmation that existing traffic remains operational.
References