Forum Discussion
Azure AD Connect reset test environment
- Apr 29, 2022
Hi,
The shortest answer to this is no, there is no way to completely reset a tenant to its initial, pristine configuration.
With respect to AAD Connect, you can approximate a reset of the tenant by uninstalling AAD Connect and removing all the user, group, computer, application and servicePrincipal objects but it's not a perfect solution.
While doing this will get rid of most of the visible artefacts, there'll be configuration settings that remain, and the more you've changed during your testing period, the more the residual settings accumulate until even after removing all these artefacts, the settings left over will be so different from a new tenant that it won't even remotely resemble a fresh environment.
The following article discusses all the prerequisites for deleting a tenant. You could do this if you wanted to then re-create a fresh tenant using the same namespaces but that isn't why I've included it here.
I've included it because it outlines many of the different areas you would want to clean out if you were trying to get your existing development tenant back to a close approximation of a fresh tenant. Again, the value of this will diminish over time and as you change more settings, but it's as good a guide as any if you're committed to this approach.
Delete an Azure AD tenant - Azure Active Directory | Microsoft Docs
Personally, I'd recommend that if you absolutely must have a new pristine tenant, and you definitely have no further use for the current development tenant, that you delete the current one and start again.
Cheers,
Lain
Hi MarcoMangianteIM ,
you could stop Azure AD sync, then delete users and start from scratch.
Please see how to turn off synchronization - Turn off directory synchronization for Microsoft 365 - Microsoft 365 Enterprise | Microsoft Docs.
I'm sure you know how to delete users from the Azure portal afterward. Once you turn off the syncing, users who have Yes under Directory synced will switch to No.
Good luck!