Azure AI Services: account stuck in non-terminal "Accepted" provisioning state after its CMK key vault and managed identity were deleted — delete fails with RequestConflict, needs backend clear

Foudil BENDJABEUR 20 Reputation points
2026-09-13T22:32:29.13+00:00

Summary

An AIServices account is permanently stuck in provisioningState: Accepted and cannot be deleted. I have already performed every self-service remediation I can find, including recovering the key vault and key it lost. The account is now deadlocked: its stored CMK identity reference is invalid, and it cannot be corrected because the non-terminal state rejects every write. I believe this requires a backend clear of the provisioning state by the product group.

Resource

  • Kind: AIServices, SKU S0, region westeurope
  • The account has no deployments and no projects. Deleting it is safe.

I have withheld the subscription and resource IDs from this public post. I can provide the full resource ID, subscription ID, and identity object IDs privately as soon as someone picks this up — just ask and I will supply them.

Names are referred to below as:

  • ACCOUNT — the stuck AIServices account
  • VAULT — the key vault that held its customer-managed key
  • KEY — the CMK inside that vault
  • OLD_IDENTITY — the original user-assigned managed identity (deleted)
  • NEW_IDENTITY — a replacement UAMI I created at the identical resource ID

How it got into this state

The account was CMK-encrypted against VAULT and OLD_IDENTITY.

Both of those were destroyed by a terraform destroy while the account itself was not managed by that Terraform state. The account immediately went to provisioningState: Failed.

Symptoms

Delete failed identically through every channel:

  • az cognitiveservices account deleteHTTP 500 InternalServerError (reproduced 5+ times)
  • az resource delete → same
  • raw DELETE via az rest against api-version=2024-10-01 → same
  • az group delete fails on this account for the same reason; the group's only other contents are the account's own CMK dependencies (the recovered vault and its managed identities), which must stay in place for any fix to be possible

Any PATCH was rejected first with CouldNotConnectToKeyVault (vault DNS no longer resolved), and after vault recovery with ManagedIdentityClientIdNotFound for the clientId of OLD_IDENTITY, which is permanently gone and cannot be recreated.

Self-service remediation I already completed

  1. Recovered the soft-deleted VAULT.
  2. Recovered the soft-deleted KEY — restored and enabled at its original version.
  3. Recreated NEW_IDENTITY at the identical resource ID as OLD_IDENTITY and granted it Key Vault Crypto Service Encryption User on VAULT. Note that a recreated UAMI necessarily receives a new clientId; the original clientId cannot be reproduced.
  4. PATCHed properties.encryption.keyVaultProperties.identityClientId to the new clientId. This returned HTTP 200 with provisioningState: Accepted.

Important: that PATCH never committed. Because the operation never reached a terminal state, properties.encryption.keyVaultProperties.identityClientId still reads the original, permanently-deleted clientId. The vault and key are restored and reachable, but the account's stored CMK identity reference cannot be corrected, because every write is now rejected by the non-terminal state. This is a deadlock: the state will not clear without the identity being valid, and the identity cannot be made valid while the state is non-terminal.

Current state

The account has been stuck in the non-terminal state Accepted for many hours with no transition to Succeeded or Failed.

Delete now returns:


RequestConflict: Cannot modify resource with id '.../accounts/ACCOUNT' because the

resource entity provisioning state is not terminal. Please wait for the

provisioning state to become terminal and then retry the request.

Things I have already ruled out

  • Resource locksaz lock list returns empty at every scope.
  • Connectionsaz cognitiveservices account connection list returns [].
  • Private endpoints — the account's private endpoint was already deleted.
  • Deployments / projects — none.
  • Documented CLI workaroundsaz resource update --set tags.fix=stuck and az resource delete --no-wait both fail with the same RequestConflict.
  • Purging other soft-deleted Cognitive Services accounts — this is the one self-service fix reported to work in a similar thread, where purging deleted resources caused the stuck account to drop to Failed. I purged every soft-deleted Cognitive Services account in this subscription; az cognitiveservices account list-deleted now returns empty. The account remained in Accepted, and an immediate delete retry still returned RequestConflict. This workaround does not apply here.
  • Waiting — polled every 60 seconds for hours continuously; no state transition at any point.

Request

Please clear the stuck provisioning state server-side so the account can be deleted. I will provide the subscription and resource IDs privately on request.

Time sensitivity

VAULT is soft-deleted with purge protection enabled, so it cannot be purged early or extended. It is scheduled to auto-purge on 2026-09-20. Once it purges, KEY is permanently unrecoverable and the account's CMK reference can never be satisfied again. Ideally this is resolved before that date.

Note: I do not have a paid support plan, so az support in-subscription tickets create returns InvalidSupportPlan, which is why I am raising it here.

Microsoft Foundry
Microsoft Foundry

A unified Azure platform for creating and managing AI models, agents, and applications with built‑in enterprise security, monitoring, and governance


Answer accepted by question author
Ganesh Gurram 7,485 Reputation points Microsoft External Staff Moderator
2026-09-15T09:44:18.14+00:00

@Foudil BENDJABEUR - Below is the reply from the PG team:

The associated projects that were blocking the deletion have now been cleaned up from the backend.

Could you please retry the deletion and let us know if the issue persists?

I Hope this helps. Do let me know if you have any further queries.


If this answers your query, please do click Accept Answer and Yes for was this answer helpful.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

Answer recommended by moderator
Foudil BENDJABEUR 20 Reputation points
2026-09-15T13:25:10.98+00:00

Hi @Ganesh Gurram ,

Thank you, and please pass my thanks to the PG team. After the backend cleanup I retried the deletion from the Azure portal and it succeeded. The account is now soft-deleted and pending purge.

For anyone who finds this thread with the same symptoms:

  • The root cause was associated projects that blocked deletion. They were not visible through ARM: listing the account's projects returned nothing and associatedProjects was empty, so it looked like there were none.
  • Deletes failed with a generic "InternalServerError: Encountered internal server error" instead of a clear "nested resources exist" error, which is why retrying never helped.
  • The missing CMK key vault and managed identity, and the provisioning state stuck in Accepted, were real, but they were not what blocked deletion. Recovering the vault and key did not unblock it.
  • No self-service workaround worked: CLI, REST, generic ARM delete, purging other soft-deleted accounts, and removing private endpoints all failed. The backend cleanup by the product team was required.

One follow-up question: is it safe to delete the recovered key vault and the managed identities now, or should I wait until the account purge completes?

Thanks again for the help.

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Alex Burlachenko 25,285 Reputation points MVP Volunteer Moderator
    2026-09-14T07:01:12.0433333+00:00

    Hi Foudil BENDJABEUR & thx for join me here at Q&A

    This is a genuine control-plane deadlock, and I don't see another meaningful self-service remediation left. The important detail is that the replacement UAMI has the same resource ID but a different clientId. The AIServices account still references the deleted identity's client ID, while the PATCH intended to replace it is stuck in Accepted. With the resource in a non-terminal provisioning state, ARM rejects both further updates and deletion. Recreating the identity at the same resource ID can't restore the old Entra identity or its client ID.

    Recovering the vault and key was the right thing to do, and I would keep the vault, key, and replacement identity untouched until this is resolved. In particular, don't attempt another Terraform cleanup, because preserving the CMK dependencies gives the backend team the best chance of completing or rolling back the pending operation.

    At this point Microsoft needs to inspect the pending Cognitive Services/AIServices operation and either force it to a terminal state or clear the stale operation so the account can be deleted. The RequestConflict itself prevents any ARM/CLI workaround from doing that.

    The September 20 Key Vault purge deadline makes this worth escalating as a service-side resource-management issue. Even without a paid technical support plan, I'd contact Azure subscription/billing support and ask whether they can route or escalate the case to the Azure AI Services resource provider team. Include the account resource ID, PATCH timestamp and correlation/request ID, old and new UAMI client IDs, and the vault/key identifiers privately. The existing public Q&A thread is useful for visibility, but only the product team can clear this backend state.

    rgds,

    Alex

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.