大网数据广告活动
域与目录服务

Can't delete a B2C directory in Microsoft Entra ID

· 52CE 我爱测

Describes an issue in which an error occurs when you try to delete a B2C directory in Microsoft Entra ID. Provides a solution.

This article describes an issue in which an error occurs when you try to delete a B2C directory in Microsoft Entra ID.

Original product version:   Microsoft Entra ID
Original KB number:   3112170

Symptoms

In a Microsoft Entra environment, you set up a B2C directory, and then you try to delete it. However, you receive the following error message:

Cannot delete '<contoso>'
The following issue(s) prevent deletion of the directory:
Directory contains one or more applications that were added by a user or administrator

Cause

This problem occurs if existing B2C application service principals (for example, CPIM, Ibiza Portal, and SSPR) are blocking the deletion.

Resolution

To fix this issue, use the Azure portal.

Step 1: Delete all apps that are listed on the Azure AD B2C Dashboard

To do this, follow these steps:

  1. Sign in Azure portal as an administrator who has access to the Azure AD B2C directory.

  2. Select your display name in the upper-right corner, and then select the directory that's your B2C directory.

    [!NOTE] If you have only one directory, your Azure AD B2C directory will already be selected.

  3. To find the Azure AD B2C blade, select the More Services (>) button in the lower-left corner, and then search on "B2C".

  4. Select Azure AD B2C.

  5. Select All Settings, and then select Applications.

    :::image type="content" source="media/cannot-delete-directory/applications-in-azure-ad-b2c.png" alt-text="Screenshot of applications setting.":::

  6. Delete all applications. To do this, select the application, select Properties, and then select the Delete button.

    :::image type="content" source="media/cannot-delete-directory/delete-applications.png" alt-text="Screenshot shows how to delete an app.":::

Step 2: Delete the Azure AD B2C tenant

To do this, follow these steps:

  1. In the Azure AD B2C directory, locate and select the Microsoft Entra ID blade in the Azure portal.

  2. On the Overview menu, select Delete Directory.

  3. Follow the instructions in the portal.

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
See source applicability · Source date 05/28/2020
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。