Hello @Kylie Clark ,
Thanks for reaching out.
When your directory has one or more activated license-based subscriptions for your organization like Azure AD Premium P2, Microsoft 365 Business Standard, or Enterprise Mobility + Security E5. To avoid accidental data loss, you can't delete a organization until the subscriptions are fully deleted. The subscriptions must be in a Deprovisioned state to allow organization deletion. An Expired or Canceled subscription moves to the Disabled state, and the final stage is the Deprovisioned state.
To know more about, refer : https://learn.microsoft.com/en-us/azure/active-directory/enterprise-users/directory-delete-howto#if-you-cant-delete-the-organization
If there no subscription active subscription then If you find that there are still enterprise applications that you can't delete in the portal, you can use the following PowerShell commands to remove them. For more information on this PowerShell command, see Remove-AzureADServicePrincipal.
- Open PowerShell as an administrator
- Run
Connect-AzAccount -tenant <TENANT_ID>
- Sign in the Azure AD Global Administrator role
- Run
Get-AzADServicePrincipal | ForEach-Object { Remove-AzADServicePrincipal -ObjectId $_.Id -Force}
Hope this helps.
------
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.