Logic App Consumption Visual Studio Deployment: Establishing connection with the service failed with code ‘DMTS_EncryptClusterCredentialsErrorCode’

This week while trying to deploy a Logic App Consumption project to the DEV environment using Visual Studio 2019 deployment, I kept getting the following error:

Status Message: Establishing connection with the service failed with code ‘DMTS_EncryptClusterCredentialsErrorCode’.

I knew that this was not “my code’s” fault since I had successfully deployed that solution several times, and this time, I was just reconfiguring API connection settings.


If you receive a DMTS_EncryptClusterCredentialsErrorCode error code, it means that your On-premises Data Gateway (OPDG) is not working. For that reason, it cannot deploy the API Connection that your Logic Apps are using.

Of course, this error only occurs if you are using OPDG in some of your connections. In my case, one of my API Connections uses an On-Premise Data Gateway to connect to a system, in this case, an SAP system.


Solving this issue is quite simple. You need to make sure that your On-premises Data Gateway (OPDG) is running properly.

In my case, the VM where the OPDG agent was installed was turned off. Turning on the VM and waiting a few minutes for the gateway to become online was everything I needed to be able to once again deploy my solution successfully.

Hope you find this helpful! So, if you liked the content or found it useful and want to help me write more, you can buy (or help me buy) my son a Star Wars Lego! 

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

Leave a Reply

Your email address will not be published. Required fields are marked *


Back to Top