How do I delete service principals in Azure AD?

Solve problems deleting service principals in Azure AD and when not to worry!

John Savill

June 9, 2015

1 Min Read
How do I delete service principals in Azure AD?

Q. I'm trying to delete all service principals in an Azure AD instance so I can delete the Azure AD instance but some cannot be deleted what do I do?

A. See if you actually can delete your intended targets.

There are certain service principals in Azure AD that cannot be deleted. If you try a command like the following:

Get-MSOLServicePrincipal | Remove-MSOLServicePrincipal

You may receive an error for certain service principals that will report they are invalid for deletion. While service principals cannot be deleted, they are actually whitelisted against the deletion task for an Azure AD instance. This means even though these service principals still exist, the deletion of the Azure AD instance will not be stopped.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like