logicapps icon indicating copy to clipboard operation
logicapps copied to clipboard

Not able to retrieve Workflow URL from ARM template

Open sahinozd opened this issue 4 years ago • 6 comments
trafficstars

We're having difficulties with retrieving the workflow URL in logic app standard through the ARM template. We need this in order to register an event grid subscription for the logic app trigger in event grid.

With consumption based logic apps we'd use ListCallbackUrl in the ARM template and it would retrieve the correct url. With standard, this not seems possible. Also tried to see if listsecrets and listkeys could be of any help, but unfortunately we're stuck

image

It would be possible to concatenate the url in ARM, but the we need to know how to get the SIG (sas token) part of the url. &sig=<SAS>

Any help on this would be really helpful, since we're not able to find it in the documentation.

sahinozd avatar Jun 02 '21 13:06 sahinozd

@hongzli or anyone else know how to do this?

sahinozd avatar Jun 02 '21 18:06 sahinozd

Also having the same issue since logic apps standard are of type "Microsoft.Web/sites" . Also tried Invoke-AzResourceAction to listsecrets but no luck.

We need this so we can setup the backend URL policies on APIM through our CI/CD pipelines

GFPhillips avatar Jun 02 '21 21:06 GFPhillips

Ok this seems to work

az rest --method post --uri https://management.azure.com/subscriptions/$(ResourceGroupName)/resourceGroups/$(ResourceGroupName)/providers/Microsoft.Web/sites/$(LogicAppName)/hostruntime/runtime/webhooks/workflow/api/management/workflows/$(YourWorkflow)/triggers/manual/listCallbackUrl?api-version=2018-11-01

edit: would be nice to have the ARM template method =)

NikolaiBlackieKiwirail avatar Jun 02 '21 22:06 NikolaiBlackieKiwirail

Ok this seems to work

az rest --method post --uri https://management.azure.com/subscriptions/$(ResourceGroupName)/resourceGroups/$(ResourceGroupName)/providers/Microsoft.Web/sites/$(LogicAppName)/hostruntime/runtime/webhooks/workflow/api/management/workflows/$(YourWorkflow)/triggers/manual/listCallbackUrl?api-version=2018-11-01

edit: would be nice to have the ARM template method =)

Good to know that it can be done through the management API!

Nevertheless, if you have a lot of logic apps and you have need to do a lot of rest calls and passing it to arm template, the process becomes unnecessary complex in Azure devops.

Also found out that you still cannot create an event grid topic subscription with this url, it ends in an error.

sahinozd avatar Jun 04 '21 04:06 sahinozd

Anyone found a way to retrieve the SIG [sas token] of a Logic App Standard workflow via listCallbackURL in ARM/Bicep or is this still an open issue?

This expression returns a 'Not Found' error: listCallbackURL('${resourceId('ResourceGroupName', 'Microsoft.Web/sites/workflows', 'LogicAppName', 'WorkflowName')}/triggers/manual', '2022-03-01').queries.sig

jaap-vdijkeM10 avatar Apr 20 '22 19:04 jaap-vdijkeM10

I think this is still an open issue. Haven't seen any updates other than using the rest API since I had opened it.

sahinozd avatar Apr 22 '22 04:04 sahinozd

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Oct 21 '22 16:10 github-actions[bot]

This issue was closed because it has been inactive for 7 days since being marked as stale.

github-actions[bot] avatar Oct 28 '22 17:10 github-actions[bot]

This is still an issue. I am having the same problem. You can list secrets from consumption logic apps but not from logic app standard.

arjendeblok avatar Nov 25 '22 07:11 arjendeblok