Azure B2C directories are still in preview at the time of this blog post. The behavior may change in the future.
This blog post is specific to Azure B2C directories where the b2c-extensions-app has been installed. If you need general help deleting an Azure directory, please see the following article for pointers:
I’ve had a few customers hit the following error when trying to delete a B2C directory.
Cannot delete ‘<B2cDirectoryName>’
The following issue(s) prevented deletion of this directory:
• Directory has one or more applications that were added by a user or administrator.
When the admin browses to the Applications section of the directory, they don’t see any application to delete.
Here are the instructions to delete the b2c-extensions-app that gets added to the directory when an Azure B2C directory has been configured.
First, browse to the directory in the classic portal:
- Click on Active Directory on the left hand ribbon
- Click on the little arrow next to the B2C directory
Second, expose the b2c-extensions-app and delete it.
- Click the Applications option along the top row.
- In the Show selection box, choose Applications my company owns
- Click the check box to the right to refresh the application list with the new selection.
- Finally, click the DELETE icon on the bottom ribbon. Confirm the deletion of the b2c-extensions-app.
After the b2c-extensions-app is removed, you will be able to delete the directory.