Share via

Foundry Project stuck in non-deletable state

Evgeny Pinigin 0 Reputation points
2026-04-26T10:30:33.56+00:00

Hello!
I can't delete MS Foundry project. There are not any resources under it.

Tried via UI, CLI and Power shell - InternalServerError 500.

I have a basic subscription and don't have paid support. So, I can't create a support ticket.

  • DELETE via az cognitiveservices account project delete returns HTTP 204 but project is NOT deleted (still returned by ARM) - DELETE via az rest with api-version=2025-04-01-preview returns HTTP 500 - Response header x-ms-failure-cause: service confirms backend-side failure - Portal UI also returns 500 Internal Server Error on delete
  • DELETE via Remove-AzResource -ResourceId "" -Force returns "Remove-AzResource: InternalServerError : Encountered internal server error. Please try again. CorrelationId: 5f6122ac-d656-4c0e-a21a-3c56d8df4cb2"

What can I do to delete the project, the parent resource and the resource group?

-----------UPDATE----------
I created also one empty project in the same resource. And I can't delete this project also with the same 500 error.

I'm an owner and an administrator of the subscription, so I have all permissions.

Foundry Tools
Foundry Tools

Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform


3 answers

Sort by: Most helpful
  1. Anshika Varshney 10,145 Reputation points Microsoft External Staff Moderator
    2026-04-30T06:56:22.4033333+00:00

    Hi Evgeny Pinigin,

    Thanks for sharing your issue.

    From your description, when a Foundry project is stuck in a non deletable state and all delete attempts return InternalServerError, it usually means the problem is happening on the backend side and not due to your configuration. [microsoftl....github.io]

    What is happening

    • Delete fails in portal, CLI, and API
    • Project still exists even after delete attempts
    • Even empty or new projects may show the same behavior

    This clearly indicates a temporary service side issue or a project stuck in an inconsistent state.

    Troubleshooting steps you can try

    1. Retry after some time

    This is the most common fix

    Example

    • You try to delete and get InternalServerError
    • Retry after some time
    • In many cases, deletion works automatically once backend cleanup completes
    1. Try deletion using Azure CLI

    Use the CLI instead of portal

    az cognitiveservices account project delete \
      --name <project-name> \
      --account-name <foundry-account-name> \
      --resource-group <resource-group-name>
    

    Example

    az cognitiveservices account project delete \
      --name my-project \
      --account-name my-foundry-account \
      --resource-group my-rg
    
    1. Verify if project is still present

    After delete, check if project still exists

    az cognitiveservices account project list \
      --account-name <foundry-account-name> \
      --resource-group <resource-group-name>
    

    If project is still listed, it means deletion is not completed yet

    1. Check for hidden or dependent resources

    Even if the project looks empty, there can be linked resources

    Example

    • Open the project and check agents model deployments endpoints connections

    If any exist, delete them first, Azure does not allow deleting a project if dependent resources are still present.

    1. Try deleting the resource group

    If project deletion keeps failing

    az group delete --name <resource-group-name> --yes --no-wait
    

    Example

    az group delete --name my-rg --yes --no-wait
    

    Note

    • This deletes all resources inside the group
    • If the project is stuck, this may also fail until backend state is fixed

    How to identify the root cause

    • Delete fails in all methods → backend issue
    • Retry works later without changes → temporary platform issue
    • Only some projects fail → those projects are stuck in corrupted state

    Important point

    If all delete attempts return InternalServerError and nothing changes, then

    • The project is likely in a partially deleted or inconsistent state
    • Deletion is controlled by backend services
    • This cannot be fixed from the user side

    This behavior is known and usually resolves after backend stabilization.

    I hope this helps. Please let me know if you have any further questions.

    Thankyou!

    0 comments No comments

  2. Evgeny Pinigin 0 Reputation points
    2026-04-27T07:49:51.87+00:00

    Hello Jerald Felix,

    I done all things that you mentioned before raising this issue here. Nothing worked.

    You proposed deletion of the parent resource and the resource group. It's not possible by design. If you try to delete some resources that have children, you receive an error that tells you about these children.

    Today I tried again and deleted projects via CLI. So, it was a temporary MS problem and currently it's possible to delete projects.

    After that I deleted the resource and the resource group.

    0 comments No comments

  3. Jerald Felix 11,550 Reputation points Volunteer Moderator
    2026-04-27T02:28:44.2766667+00:00

    Hello Evgeny Pinigin,

    Greetings!

    Thanks for raising this question in Q&A forum.

    You have done an excellent job of diagnosing this the response header x-ms-failure-cause: service is the key piece of evidence here. This confirms beyond doubt that the deletion failure is happening on Microsoft's backend infrastructure, not due to anything wrong on your end. The fact that even a brand new empty project in the same resource fails with the same 500 error further confirms this is a platform-side issue specific to your Foundry resource or region. You have full Owner and Administrator permissions, so permissions are not the problem either.

    Here is a structured approach to what you can try and how to get this resolved:

    Step 1: Try deleting via the New Foundry Portal UI

    Sometimes the classic portal and the new Foundry portal use different backend paths. Try this:

    1. Go to foundry.microsoft.com and sign in.
    2. Make sure the New Foundry toggle is turned on (top right area).
    3. Navigate to Operate → Admin.
    4. Select your stuck project and click the trash can / delete icon.

    This sometimes routes through a different management endpoint than the Azure Portal or CLI.

    Step 2: Try deleting the parent AIServices account directly

    Since even new empty projects in the same resource fail, the issue may be at the parent AIServices account level rather than the project level. Try deleting the parent resource entirely:

    Remove-AzResource `
      -ResourceId "/subscriptions/<sub-id>/resourceGroups/<rg>/providers/Microsoft.CognitiveServices/accounts/<account-name>" `
      -Force
    

    Or via CLI:

    az cognitiveservices account delete \
      --name <account-name> \
      --resource-group <rg-name>
    

    If the parent account deletion also returns 500, it confirms a backend lock on the entire resource.

    Step 3: Try deleting the entire resource group

    Since you want to delete the resource group too, try bypassing the project and account deletion entirely by deleting the whole resource group in one go:

    az group delete --name <resource-group-name> --yes --no-wait
    

    Or in PowerShell:

    Remove-AzResourceGroup -Name "<resource-group-name>" -Force
    

    This sometimes succeeds even when individual resource deletions fail, as it triggers a different ARM-level cleanup path.

    Step 4: Check for resource locks

    Even as Owner/Admin, resource locks can silently block deletions:

    1. Go to Azure Portal → your Resource Group → Locks (in the left menu).
    2. Also check locks at the individual resource level: your AIServices account → Locks.
    3. If any Delete or ReadOnly lock exists, remove it and retry the deletion.

    Step 5: Open a free Azure Support request you do not need a paid plan

    You mentioned you have a Basic subscription and no paid support, but you can still raise a billing and subscription management support ticket for free this type of ticket is available to all Azure subscribers at no cost:

    1. Go to portal.azure.com → search for Help + Support → click Create a support request.
    2. Under "Issue type", select Technical.
    3. Select your subscription → Service: Cognitive Services / Azure AI Foundry → Problem type: Resource deletion failure.
    4. In the description, include:
      • Your CorrelationId: 5f6122ac-d656-4c0e-a21a-3c56d8df4cb2
        • The response header: x-ms-failure-cause: service
          • The fact that both original and newly created empty projects fail with 500.
          1. Request that the backend engineering team perform a forced cleanup of the stuck Foundry projects and the parent AIServices account.

    The CorrelationId you already have is extremely valuable it allows the engineering team to look up the exact failed operation in their internal logs and identify what is blocking the deletion on the backend.

    Quick Summary: This is a confirmed backend/platform issue and cannot be fixed from your side. The response header x-ms-failure-cause: service and CorrelationId prove this clearly. Try deleting at the resource group level as a workaround. If that also fails, raise a free Technical support ticket using your CorrelationId — Basic subscribers are eligible for this type of request and the engineering team can force-clean the stuck resource from the backend.

    If this answer helps you kindly accept the answer which will help others who have similar questions.

    Best Regards,

    Jerald Felix.

    0 comments No comments

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.