You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Can't delete a directory through the Azure Management Portal
10
10
@@ -91,22 +91,20 @@ If you have an Azure subscription, make sure that your Azure subscription is not
91
91
92
92
To learn how to remove applications from your directory, read [Adding, updating, and removing an application](/azure/active-directory/develop/quickstart-register-app)
93
93
94
-
[!INCLUDE [Azure AD PowerShell deprecation note](~/../support/reusable-content/msgraph-powershell/includes/aad-powershell-deprecation-note.md)]
94
+
You may also have to remove additional service principals. Use [Microsoft Graph PowerShell](/powershell/microsoftgraph/installation) to remove all service principals:
95
95
96
-
You may also have to remove additional service principals. Use Azure Active Directory module for Windows PowerShell to remove all service principals. To do this, follow these steps:
97
-
98
-
1. Open Azure Active Directory module for Windows PowerShell.
99
-
2. Connect to the Microsoft Online Service.
100
-
3. Run the following command:
96
+
1.[Install Microsoft Graph PowerShell](/powershell/microsoftgraph/installation).
97
+
2. Run the `Remove-MgServicePrincipal` command to remove all service principals. This command requires at least the `Application.ReadWrite.All` permission. For more information, see [Remove-MgServicePrincipal](/powershell/module/microsoft.graph.applications/remove-mgserviceprincipal?view=graph-powershell-1.0&preserve-view=true).
> You may receive an error when you remove some service principals. These principals can't be removed. However, this does not prevent you from deleting your directory. The error that you receive may resemble the following:
108
106
>
109
-
> Remove-MsolServicePrincipal : Invalid value for parameter. Parameter Name: appPrincipalId.
107
+
> Remove-MgServicePrincipal: Specified App Principal ID is Microsoft Internal.
110
108
111
109
## Directory has one or more Multi-Factor Authentication providers
0 commit comments