I have an Azure AD B2C tenant that I want to delete (pita process!). So I have to delete manually all registered applications first. And somehow I got an enterprise application named "Azure DevOps" registered there. Which is undeletable. How to remove it?
Asked
Active
Viewed 2,233 times
8
-
Have you tried my solution? Is it helpful? – Allen Wu Jan 16 '20 at 01:18
2 Answers
34
I have found that there is no ne3ed to delete this application in order to delete the B2C tenant. Go to the properties of this application, then set "Enable users to sign-in to No". Then it will be posssible to delete the B2C tenant.

Michael Chudinov
- 2,620
- 28
- 43
-
3Same problem, this worked for me as well. Pretty stupid this has to be the solution but it works. – Alex Nov 20 '20 at 01:00
-
This worked for me as well, although I had fully log out and then back in to the Azure Portal in order to get past another possibly unrelated error "User is not authorized to read Azure subscriptions. Permission elevation is required to proceed." – Brice Williams Nov 22 '20 at 15:27
-
1That worked....thanks for the work-around !!! What a lame process !!! – Prisoner ZERO Dec 02 '20 at 20:24
-
1Wow, you're a genius @mikael-chudinov! How'd you figure that out? There's nothing in the portal or documentation about that :-/ – Duckboy Feb 01 '21 at 13:05
1
If you are trying to delete the Azure AD B2C tenant, I guess you have deleted all the users and admins.
Anyway, you need an admin account (if you don't have one, just create it) to log in to Azure AD in Powershell and use Remove-AzureADServicePrincipal -objectid
to delete this enterprise app.
See details here.

Allen Wu
- 15,529
- 1
- 9
- 20
-
Can you tell what is the function of this Enterprise Application in the first place? What does the Enterprise Application named "Azure DevOps" even do? As far as I'm aware, Im using Azure's Devops' website CI/CD functions with a service connection that is a ServicePrincipal that is in no way associated with the Enterprise Application called "Azure DevOps". And I cannot delete the "Azure DevOps" Enterprise Application, the `Remove-AzureADServicePrincipal -objectid` fails with `Code: Authentication_Unauthorized Message: User was not found` even though I am Global Administrator – Optical Carrier Apr 28 '20 at 15:53