Over the last 12 months many of you have asked when we would add the ability to delete your un-used Azure AD tenants. This seems like an obvious feature, but it turns out it is relatively complex and risky. In the first few years of Office 365, we had a way to delete a tenant and several of our customer’s admins chose to use it. And when they did, they discovered, to their chagrin, that they had just shut down their Office365 deployment and now no one in the company could get email anymore.
Based on those early incidents, we turned the feature off and we’ve been very careful to make sure we have a “belt and suspenders” model in place before turning it back on.
The good news is that we’ve finished adding the belt and suspenders and have turned the feature back on. You can delete a cloud directory that you no longer need! For example, if you created a directory in the Azure Management Portal to use in a sandbox environment for a demonstration or for evaluation purposes, you might want to delete the directory. Now you can delete that unneeded directory, with the assurance that you won’t accidentally delete a directory that controls access to important resources.
If you have a directory you do not need, you can delete it by signing in to the Azure Management Portal and follow the steps below.
Deleting a Directory
To delete a directory, select it on the ALL ITEMS list, or on the DIRECTORY tab of the Active Directory extension. Then click the DELETE button, indicated in Fig 1 by the red circle.
Fig 1: Initiating deletion of a directory
Then, when you see the “Delete Directory” dialog, select the checkbox indicated by the red circle in Fig 2 to confirm that you want to delete that directory, then click the checkmark in the lower right of the dialog.
Fig 2: Deleting a directory
Deleting a directory deletes all the resources in the directory, so you should be sure you do not need the directory before you delete it. Neither the directory nor the resources in the directory can be restored.
In order to delete a directory, you must be a global administrator of the directory. Also, if you’re signed into the Azure Management Portal with an organizational account, you cannot delete the home directory of your user account. For example, if you’re signed in as email@example.com, you cannot delete the directory with the initial domain contoso.onmicrosoft.com.
Preventing Accidental Deletion
To protect you from accidentally deleting an important directory, the directory deletion feature prevents deletion of a directory that contains important resources or is relied on by subscriptions.
To delete a directory, Azure AD requires that there is only one user in the directory, no applications in the directory, and that there are no subscriptions to Azure, Office 365, or other Microsoft services for organizations that rely on the directory. To read the full list of requirements, read the documentation for the feature here.
If you attempt to delete a directory that cannot be deleted, the portal will guide you to correct the conditions that prevent deletion of the directory.
Fig 3: Seeing conditions that prevent deletion of a directory
We hope you like the directory deletion feature in Azure Active Directory. Let us know what you think! If you have feedback on the feature, whether it is something you like or dislike, or hope to see in future – please let us know by posting in our forum.
Alex Simons (twitter: @Alex_A_Simons)
Director of Program Management
Active Directory Team