I want to remove a tenant from Azure portal.
All Enterprise applications should be deleted before the tenant removing:
There are two options how Enterprise applications could be removed:
"Properties"
, click "Delete"
button. This option is not available as "Delete"
button is disabled."No valid subscription found. You need an Azure subscription to use Azure Cloud Shell"
.I don't want to activate an Azure subscription just for the removing tenant.
But all options are useless in this case.
Any alternative approach?
You should be able to delete the enterprise application in the portal, make sure you logged in to the portal with the Global admin
account.
If this still not work, try to use powershell in local(not in cloud shell).
1.Install the AzureAD
module.
Install-Module -Name AzureAD
2.Login with Global admin
account.
Connect-AzureAD -TenantId <TenantId>
3.Delete the enterprise application.
Remove-AzureADServicePrincipal -ObjectId <app objectid got from the portal>