Account does not belong to an environment


I have an Azure subscriptions limited to Dev.CI environment named Azure - Ottoboni Corporate - Development.

CI, Test and Production environment is running in Azure, but then for various reasons we can not use the new native built-in support (Management certificate) to publish WebApps more than in the CI environment, it means that we must use the “old” way with WebDeploy and a separate agent to publish to the test and production environment.

This means that we in the project has three steps, the first step is of the type “Deploy an Azure Web App”, it is limited to run in Dev.CI environment and in that step, we use our Azure subscriptions described above.

Step two is of the type “Deploy a nuget package” and limited to Release.Test environment, step three is a custom template “Web Deploy - Publish Website (MSDeploy)” to publish to Azure with WebDeploy and are limited to Release.Test environment as well.

My problem is that when I try to publish to the Test and Production environment I get the following error:

“There was a problem with your request.
The Azure - Ottoboni Corporate - Development account does not belong to the Release.Test environment and this project cannot be deployed. Either add the account to the Release.Test environment or resolve a different account to use for deploying to the Release.Test environment.
Once you have corrected these problems you can try again.
If the problem is related to a variable you will need to update the variables for this release or recreate the release for the changes to take effect.
If the problem is related to the deployment process you will need to create a new release for the changes to take effect.”

This is because I limited use of our Azure account called “Azure - Ottoboni Corporate - Development” to Dev.CI environment, but I have limited in the deploy process of this step is to run only Dev.CI and Octopus should ignore to validate this at the Test and Production environment?


Hi Kalle,

Thanks for reaching out. I’ve just submitted a github issue that seems quite related to what you are reporting