Unable to delete Azure AD tenant even though there are no errors showing

Robina 20 Reputation points
2023-05-31T18:34:05.43+00:00

I have an Azure AD tenant that I would like to delete however I am unable to do so even though there are no errors showing

User's image

User's image

there are no logs or further error messages i can look into.

has anyone encountered this problem or know where I can look further into?

thanks

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

Accepted answer
  1. 2023-06-01T06:34:56.9066667+00:00

    Hello @Robina , you are unable to delete your tenant because some enterprise applications, most probably Microsoft First Party applications, are still onboarded. Inspect the failing delete tenant requests using your browser developer tools and network tab. The response content should include detailed information such as the app Id or object id of the enterprise application(s) still present. Use any of those ids in tandem with a library like MS Graph for PowerShell to remove then and try to delete your tenant one more time. Keep in mind you may have to repeat the aforementioned steps several times depending on the number of applications still present.

    Removing service principal by object id
    Connect-MgGraph -Scopes "Application.ReadWrite.All"
    Remove-MgServicePrincipal -ServicePrincipalId # service principal object (not app) id
    

    Or

    Removing service principal by appId
    Connect-MgGraph -Scopes "Application.ReadWrite.All"
    Get-MgServicePrincipal -Filter "appId eq '<app id'>"|Remove-MgServicePrincipal
    

    Let us know if you need additional assistance. If the answer was helpful, please accept it and rate it so that others facing a similar issue can easily find a solution.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful