Question

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

John


Sponsored



Replies

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 .https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-template-deploy
  • 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?

Thanks

John

{

"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": {

//}

}