Deploy Dynamics CRM connectors from template

Category: azure logic apps


John_Long2017 on Tue, 21 Feb 2017 21:33:29

Hi All,

Me again :)

We are looking at automating the deployment of our logic apps into Azure.  We have successfully built resource templates for the logic apps and connectors.  These deploy and everything looks good.

However when we go into the logic app the CRM API connector needs authorising manually.  This is simply  a case of entering the  CRM username and password.  Ideally we do not want this manual step. 

Has anyone come up against this issue before and come up with a solution / workaround?

Many Thanks



Abhishek0127[Abhishek kumar] on Tue, 21 Feb 2017 22:22:04

Hi Jon,

I think you can use below process to automate the deployment process with Visual studio .

  • Step1 -- Create the API connection for your Logic Apps using ARM template and power shell  .Below link can help you .
  • step 2-- Copy the Logic App automation script from Azure portal and paste it within Visual Studio Logic App template
  • step3 -- Parameterize  the Logic App definition within Visual Studio and create different parameter files for different environment .

I know there is some work associated here but this is the way you can manage different environment with different API connections for your Logic Apps 

John_Long2017 on Fri, 24 Feb 2017 08:50:02

Hi Abishek,

Thanks for your reply.  We had done that the issue was we were having to authorize the Dynamics CRM connector every time we deployed.

After some experimentation I found that the parameters section in the API settings below was causing the issue.  With this commented out the CRM connector needs authorizing on initial creation but remains authorized after this. (as long as the parameters section is commented out / not present)

I'm guessing we could put the necessary details in here so it authorizes automatically on intial setup.  Do you know what values need to go in here or if that's possible?




"type": "Microsoft.Web/connections",

"apiVersion": "2016-06-01",

"location": "[resourceGroup().location]",

"name": "[variables('dynamicsCrmOnlineConnectionName')]",

"properties": {

"api": {

"id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/dynamicscrmonline')]"


"displayName": "[variables('dynamicsCrmOnlineConnectionName')]"

//"parameterValues": {



JoostJV on Wed, 19 Jul 2017 13:19:21

Hi John,

Have you got an answer to your problem already? 

We are running into the same issue in our project.



John_Long2017 on Wed, 19 Jul 2017 22:18:37

Hi Joost,

No I never got an answer on how to create the CRM connector as part of a template.  However the solution I outlined above allowed us to at least not have to re-authorize the connector after every deployment. 

Sorry can't be more help but this solution has at allowed us to have automated deployments without manual intervention (at least after the first time)

if you need any more info I'm happy to help.