Can't delete our old tenant

Sébastien GENESTA 26 Reputation points
2021-11-03T08:44:18.277+00:00

Hi,

Following tenant migration (to another Azure tenant), i'm trying to delete the old one.

Even if there's no more enterprise applications, the delete process is in warn status saying "delete all enterprise applications"

I have delete my subscription so i'm now unable to contact Azure support to ask for help.

Thanks.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,844 questions
0 comments No comments
{count} vote

Accepted answer
  1. JamesTran-MSFT 36,476 Reputation points Microsoft Employee
    2021-11-04T17:14:38.82+00:00

    @Sébastien GENESTA
    Thank you for the detailed responses!

    Based off your issue, I found a related thread and an internal support request with some additional troubleshooting steps that might help resolve your issue. However, if these steps don't work, you can definitely try creating an Azure Support Request without an active subscription to get your Azure AD tenant deleted.

    Delete tenant - Enterprise Applications

    1. Run Windows PowerShell ISE as Administrator
    2. Run the command Install-Module MSOnline (You may skip this command if you already have Msol module installed on your machine)
    3. Run the command Connect-Msolservice and enter the credential of your Global Admin account (eg. User: admin@[organization].onMicrosoft.com + password)
    4. Run the command Get-MsolServicePrincipal | Select Displayname
    5. Run the command Get-MsolServicePrincipal | Remove-MsolServicePrincipal
    6. Please kindly ignore the errors as there will be some build-in Microsoft Apps cannot be deleted.
    7. Log in back to your Azure tenant, and try one more time to delete it.

    Enterprise Applications should now have a green check mark and you should be able to go through the delete process.

    Create a Support Request to delete Tenant:
    If the above steps don't resolve your issue, you can create an Azure Technical Support Request by navigating to your Azure Active Directory -> New Support Request
    146568-image.png

    I hope this helps!

    If you have any other questions, please let me know.
    Thank you for your time and patience throughout this issue.

    ----------

    Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

    1 person found this answer helpful.
    0 comments No comments

7 additional answers

Sort by: Most helpful
  1. Sébastien GENESTA 26 Reputation points
    2021-11-05T14:15:35.857+00:00

    Hi!

    It worked!

    Thanks again!

    0 comments No comments

  2. Paul 0 Reputation points
    2023-08-20T07:25:47.9766667+00:00

    Hello! I have a similar issue. Can someone please help me to resolve it?

    Trying to delete an old tenant with only one user - global administrator.

    When clicking on "Delete tenant", all check are marked green(passed) in Azure portal. But next, when I confirms deletion, it says:

    Error:
    Unable to delete tenant
    Unable to delete tenant Каталог по умолчанию. Known issues exist where some enterprise applications are not capable to delete within the portal. Click the notification title for more information and manual troubleshooting steps.

    Link in error description above follows to next documentation: https://learn.microsoft.com/en-us/azure/active-directory/enterprise-users/directory-delete-howto#remove-enterprise-apps-that-you-cant-delete

    There are some issues when using regular Powershell, but Powershell ISE made me able to get to step N6:

    1. Run the following command to remove any enterprise apps that you can't delete: Get-AzADServicePrincipal | ForEach-Object { Remove-AzADServicePrincipal -ObjectId $_.Id }

    Executing command above result in a lot of errors in Powershell with next decription:

    Specified App Principal ID is Microsoft Internal.

    Here is all of them:

    Az.MSGraph.internal\Remove-AzADServicePrincipal : Specified App Principal ID is Microsoft Internal.
    At C:\Program Files\WindowsPowerShell\Modules\Az.Resources\6.9.0\MSGraph.Autorest\custom\Remove-AzADServicePrincipal.ps1:194 char:5
    +     Az.MSGraph.internal\Remove-AzADServicePrincipal @PSBoundParameter ...
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: ({ Id = 157a76d9...f, IfMatch =  }:<>f__AnonymousType15`2) [Remove-AzADServicePrincipal_Delete], Exception
        + FullyQualifiedErrorId : Request_BadRequest,Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Cmdlets.RemoveAzADServicePrincipal_Delete
    Az.MSGraph.internal\Remove-AzADServicePrincipal : Specified App Principal ID is Microsoft Internal.
    At C:\Program Files\WindowsPowerShell\Modules\Az.Resources\6.9.0\MSGraph.Autorest\custom\Remove-AzADServicePrincipal.ps1:194 char:5
    +     Az.MSGraph.internal\Remove-AzADServicePrincipal @PSBoundParameter ...
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: ({ Id = 3640c166...3, IfMatch =  }:<>f__AnonymousType15`2) [Remove-AzADServicePrincipal_Delete], Exception
        + FullyQualifiedErrorId : Request_BadRequest,Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Cmdlets.RemoveAzADServicePrincipal_Delete
    Az.MSGraph.internal\Remove-AzADServicePrincipal : Specified App Principal ID is Microsoft Internal.
    At C:\Program Files\WindowsPowerShell\Modules\Az.Resources\6.9.0\MSGraph.Autorest\custom\Remove-AzADServicePrincipal.ps1:194 char:5
    +     Az.MSGraph.internal\Remove-AzADServicePrincipal @PSBoundParameter ...
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: ({ Id = 505e36e1...e, IfMatch =  }:<>f__AnonymousType15`2) [Remove-AzADServicePrincipal_Delete], Exception
        + FullyQualifiedErrorId : Request_BadRequest,Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Cmdlets.RemoveAzADServicePrincipal_Delete
    Az.MSGraph.internal\Remove-AzADServicePrincipal : Specified App Principal ID is Microsoft Internal.
    At C:\Program Files\WindowsPowerShell\Modules\Az.Resources\6.9.0\MSGraph.Autorest\custom\Remove-AzADServicePrincipal.ps1:194 char:5
    +     Az.MSGraph.internal\Remove-AzADServicePrincipal @PSBoundParameter ...
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: ({ Id = 5bd407f9...d, IfMatch =  }:<>f__AnonymousType15`2) [Remove-AzADServicePrincipal_Delete], Exception
        + FullyQualifiedErrorId : Request_BadRequest,Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Cmdlets.RemoveAzADServicePrincipal_Delete
    Az.MSGraph.internal\Remove-AzADServicePrincipal : Specified App Principal ID is Microsoft Internal.
    At C:\Program Files\WindowsPowerShell\Modules\Az.Resources\6.9.0\MSGraph.Autorest\custom\Remove-AzADServicePrincipal.ps1:194 char:5
    +     Az.MSGraph.internal\Remove-AzADServicePrincipal @PSBoundParameter ...
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: ({ Id = 7075a0e2...a, IfMatch =  }:<>f__AnonymousType15`2) [Remove-AzADServicePrincipal_Delete], Exception
        + FullyQualifiedErrorId : Request_BadRequest,Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Cmdlets.RemoveAzADServicePrincipal_Delete
    Az.MSGraph.internal\Remove-AzADServicePrincipal : Specified App Principal ID is Microsoft Internal.
    At C:\Program Files\WindowsPowerShell\Modules\Az.Resources\6.9.0\MSGraph.Autorest\custom\Remove-AzADServicePrincipal.ps1:194 char:5
    +     Az.MSGraph.internal\Remove-AzADServicePrincipal @PSBoundParameter ...
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: ({ Id = 82c8223d...7, IfMatch =  }:<>f__AnonymousType15`2) [Remove-AzADServicePrincipal_Delete], Exception
        + FullyQualifiedErrorId : Request_BadRequest,Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Cmdlets.RemoveAzADServicePrincipal_Delete
    Az.MSGraph.internal\Remove-AzADServicePrincipal : Specified App Principal ID is Microsoft Internal.
    At C:\Program Files\WindowsPowerShell\Modules\Az.Resources\6.9.0\MSGraph.Autorest\custom\Remove-AzADServicePrincipal.ps1:194 char:5
    +     Az.MSGraph.internal\Remove-AzADServicePrincipal @PSBoundParameter ...
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: ({ Id = 89d54aee...d, IfMatch =  }:<>f__AnonymousType15`2) [Remove-AzADServicePrincipal_Delete], Exception
        + FullyQualifiedErrorId : Request_BadRequest,Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Cmdlets.RemoveAzADServicePrincipal_Delete
    Az.MSGraph.internal\Remove-AzADServicePrincipal : Specified App Principal ID is Microsoft Internal.
    At C:\Program Files\WindowsPowerShell\Modules\Az.Resources\6.9.0\MSGraph.Autorest\custom\Remove-AzADServicePrincipal.ps1:194 char:5
    +     Az.MSGraph.internal\Remove-AzADServicePrincipal @PSBoundParameter ...
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: ({ Id = 9f5342cb...7, IfMatch =  }:<>f__AnonymousType15`2) [Remove-AzADServicePrincipal_Delete], Exception
        + FullyQualifiedErrorId : Request_BadRequest,Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Cmdlets.RemoveAzADServicePrincipal_Delete
    Az.MSGraph.internal\Remove-AzADServicePrincipal : Specified App Principal ID is Microsoft Internal.
    At C:\Program Files\WindowsPowerShell\Modules\Az.Resources\6.9.0\MSGraph.Autorest\custom\Remove-AzADServicePrincipal.ps1:194 char:5
    +     Az.MSGraph.internal\Remove-AzADServicePrincipal @PSBoundParameter ...
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: ({ Id = ba8ccb58...c, IfMatch =  }:<>f__AnonymousType15`2) [Remove-AzADServicePrincipal_Delete], Exception
        + FullyQualifiedErrorId : Request_BadRequest,Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Cmdlets.RemoveAzADServicePrincipal_Delete
    Az.MSGraph.internal\Remove-AzADServicePrincipal : Specified App Principal ID is Microsoft Internal.
    At C:\Program Files\WindowsPowerShell\Modules\Az.Resources\6.9.0\MSGraph.Autorest\custom\Remove-AzADServicePrincipal.ps1:194 char:5
    +     Az.MSGraph.internal\Remove-AzADServicePrincipal @PSBoundParameter ...
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: ({ Id = d9336fab...d, IfMatch =  }:<>f__AnonymousType15`2) [Remove-AzADServicePrincipal_Delete], Exception
        + FullyQualifiedErrorId : Request_BadRequest,Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Cmdlets.RemoveAzADServicePrincipal_Delete
    Az.MSGraph.internal\Remove-AzADServicePrincipal : Specified App Principal ID is Microsoft Internal.
    At C:\Program Files\WindowsPowerShell\Modules\Az.Resources\6.9.0\MSGraph.Autorest\custom\Remove-AzADServicePrincipal.ps1:194 char:5
    +     Az.MSGraph.internal\Remove-AzADServicePrincipal @PSBoundParameter ...
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: ({ Id = e9ec0b77...4, IfMatch =  }:<>f__AnonymousType15`2) [Remove-AzADServicePrincipal_Delete], Exception
        + FullyQualifiedErrorId : Request_BadRequest,Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Cmdlets.RemoveAzADServicePrincipal_Delete
    Az.MSGraph.internal\Remove-AzADServicePrincipal : Specified App Principal ID is Microsoft Internal.
    At C:\Program Files\WindowsPowerShell\Modules\Az.Resources\6.9.0\MSGraph.Autorest\custom\Remove-AzADServicePrincipal.ps1:194 char:5
    +     Az.MSGraph.internal\Remove-AzADServicePrincipal @PSBoundParameter ...
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: ({ Id = ebfb467f...9, IfMatch =  }:<>f__AnonymousType15`2) [Remove-AzADServicePrincipal_Delete], Exception
        + FullyQualifiedErrorId : Request_BadRequest,Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Cmdlets.RemoveAzADServicePrincipal_Delete
    Az.MSGraph.internal\Remove-AzADServicePrincipal : Specified App Principal ID is Microsoft Internal.
    At C:\Program Files\WindowsPowerShell\Modules\Az.Resources\6.9.0\MSGraph.Autorest\custom\Remove-AzADServicePrincipal.ps1:194 char:5
    +     Az.MSGraph.internal\Remove-AzADServicePrincipal @PSBoundParameter ...
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: ({ Id = ef9d5245...b, IfMatch =  }:<>f__AnonymousType15`2) [Remove-AzADServicePrincipal_Delete], Exception
        + FullyQualifiedErrorId : Request_BadRequest,Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Cmdlets.RemoveAzADServicePrincipal_Delete
    

    All next steps from official documentation, liked above, fails. I can provide errors text if it could help to solve my problem, but it looks like problem with step 6 should be fixed first.
    I have tried all solutions provided within this thread - unfortunately, it didn't help.

    There is information in this thread, that possible solution could be to find and configure next app:

    DisplayName : Microsoft Partner
    Application ID : 4990cffe-04e8-4e8b-808a-1175604b879f

    But it is not present in a list of all enterprise apps on Azure portal:User's image

    I really need help with deleting this tenant. Have tried all possible solutions, found on the Internet - unsuccessfully.
    It seems like impossible to contact with support without active subscription - which I don't have.

    Please help me resolve this issue. Will be much appreciate.

    0 comments No comments

  3. Paul 0 Reputation points
    2023-08-20T07:32:48.64+00:00

    //Sorry, accidently duplicated previous message, cannot delete duplicate, edited//

    0 comments No comments