0
votes

I am able to start logic app using "Start-AzLogicApp" command, but parameters passed as part of this command are not actually getting passed to Logic APP. instead default values are used.

Code to trigger logic App $parameters = @{ "StartTime" = $startTime; "EndTime" = $endTime } Start-AzLogicApp -ResourceGroupName myres -Name $logicAppName -MyLogicApp $trigger.Name -Parameters $parameters

Logic App parameter Definition "parameters": "EndTime": { "defaultValue": "temp2", "type": "String" }, "StartTime": { "defaultValue": "temp", "type": "String" }

Appreciate if anyone can help on this.

1

1 Answers

0
votes

It seems a bug of Start-AzLogicApp command, here is another post about this problem for your reference:

enter image description here

As a workaround, you can trigger the logic app with parameters by this command below:

$parameters = '{ 
    "param1": "abc" 
}'

$headers = @{"Content-Type" = "application/json"}

Invoke-WebRequest -Uri $url -Method POST -Body $parameters -Headers $headers