D365 Business Central : An environment with the same name already exists
Have you recently encountered an error message when trying to create a new sandbox environment after deleting the old one and recreating it with the same name? If yes, then you’re not alone. I recently had two people asking me why they were getting this error message.
An environment with the same name already exists. Note that the desired name may also be in use by a currently soft-deleted environment.
This error message is a result of a recently introduced feature called Restore Deleted Environments. When you delete your environment, the deleted environment is given a state of soft-deleted for seven days. During this time, admins can restore the environment without having to involve Microsoft support.
To avoid this issue, choose a different name for your new sandbox environment, or rename the deleted environment by accessing the Recently Deleted Environments.
Click on the environment.
Click Rename and rename it to something else.
So there you have it, if you ever encounter this error message in the future, you now know what to do. Hopefully Microsoft will automatically renamed deleted environments to avoid this issue.
New update: Microsoft has deployed a fix for this. The deleted environment name has date and time suffix added to it.
Hello
I found this so annoying, and I was using your Trick, however I found today Microsoft fixed this and when you delete a sandbox will rename at the same time so you can reuse it.
Hi Carlos,
Thanks. I can confirm that Microsoft has deployed the fix for this.