79094419

Date: 2024-10-16 14:09:26
Score: 0.5
Natty:
Report link

Based on previous answers, including from Ikhtesam, I managed the following:

$workflowUri = "/subscriptions/$SubscriptionId/resourceGroups/$ResourceGroup/providers/Microsoft.Web/sites/$LogicAppName/workflows/"
$workflows = az resource show --ids $workflowUri | ConvertFrom-Json
foreach ($workflow in $workflows.value) {
    $workflowName = $workflow.name -replace "$LogicAppName/", ""
    $triggerUri = "https://management.azure.com/subscriptions/$SubscriptionId/resourceGroups/$ResourceGroup/providers/Microsoft.Web/sites/$LogicAppName/hostruntime/runtime/webhooks/workflow/api/management/workflows/$workflowName/triggers/$TriggerName/listCallbackUrl?api-version=2018-11-01"
    $response = az rest --method post --uri $triggerUri | ConvertFrom-Json
    Write-Output $response.value
}
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Germán Mendoza