Fix: Environment [environmentid] is already configured with pipelines in host environment [host-environmentid]
I recently ran into the error above while testing out some cool features of Power Platform Pipeline.
The full error message is: Environment [environmentid] is already configured with Pipelines in host environment [host-environmentid]. Please delete the environment from the other host to add the environment to this host environment [host-environmentid] or perform a Force Link.
The error came up when trying to create an environment from the Deployment Pipeline Configuration app because if you want to associate your environments to a host, you must set them up in the deployment config app.
Normally, after configuring an environment, you get "Pending" as validation status and after few minutes, the validation status changes to "Successful", indicating readiness for usage in pipelines. But this time, the validations status was "Failed" with a message in the error field as shown below.
While looking for a fix, I discovered the following:
- As mentioned in the message, the environment was already tied to a host, this was true but I already deleted that environment. Apparently, it was still referencing it. This needs to be escalated to Microsoft.
- If you want this environment to be associated to this host, you could easily fix this error by click a button (Force Link) in the ribbon bar. After confirming the operation, the environment is then associated successfully.
Once you click “Confirm”, you get the validating message:
Checking back after a few minutes, you find everything fine and the validation status is updated:
Now, your environment is linked to the host.
That's all about it for today.
If you ever run into this error or something similar preventing you from associating an environment to a host, you now know what to do.