Share via

Delete Tenant

Adam Hinchliff 0 Reputation points
2025-09-24T11:20:30.7466667+00:00

I made the fatal error of joining my personal email to Azure and now im trying to shutdown my email and im stuck in the ridiculous MS loop.

I would appreciate in some help to close this down :(

ive tried this -

WARNING: This will delete your enterprise application forever

//Login to Azure from Powershell
Login-AzAccount

//Ensure that you are connected to the correct Tenant
Get-AzContext

//Get your Enterprise Applications just to see the number
Get-AzAdServicePrincipal

//Use foreach to delete all of them
Get-AzAdServicePrincipal | ForEach-Object -Process {Remove-AzADServicePrincipal -ObjectId $_.Id}

//There could be some errors about undeletable Enterprise Apps, don't worry
//Check the list again
Get-AzAdServicePrincipal

//Enjoy that many are not there anymore. :-)

MS

Azure | Azure Training
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.