azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

Start-AzLogicApp Parameters not passed to Logic App workflow definition parameters

Open mehowq opened this issue 7 years ago • 16 comments

Description

The 'Start-AzLogicApp' command has a 'Parameters' parameter that 'Specifies a parameters collection object of the logic app. Specify a hash table, Dictionary, or Dictionary<string, WorkflowParameter>'. However, it seems the parameters are not passed into the Logic App.

Steps to reproduce

Example script:

$lAppParamObj = @{ 'paramRequestorFirstName' = "TestParameterPassedIn"}

Start-AzLogicApp `
     -ResourceGroupName "test-rg" `
     -Name "TestLogicApp" `
     -Parameters $lAppParamObj `
     -TriggerName "manual"

Logic App parameters definition

"parameters": {
            "$connections": {
                "defaultValue": {},
                "type": "Object"
            },
            "paramRequestorFirstName": {                
                "defaultValue": "test123",
                "type": "string"
            }
        },

Initilising a variable within Logic App definition

"Initialize_variable_2": {
                "inputs": {
                    "variables": [
                        {
                            "name": "RequestorFirstName",
                            "type": "String",
                            "value": "@{parameters('paramRequestorFirstName')}"
                        }
                    ]
                },
                "runAfter": {},
                "type": "InitializeVariable"
            },

The variable returns "test123" instead of "TestParameterPassedIn"

mehowq avatar Mar 01 '19 18:03 mehowq

The 'Parameters' object doesn't seem to be used anywhere https://github.com/Azure/azure-powershell/blob/master/src/LogicApp/LogicApp/Cmdlets/LogicApp/RunAzureLogicAppCommand.cs

mehowq avatar Mar 01 '19 18:03 mehowq

The API doesn't seem to accept 'Parameters' either https://docs.microsoft.com/en-us/rest/api/logic/workflowtriggers/run

mehowq avatar Mar 01 '19 18:03 mehowq

@refortie It looks like this parameter is completely unused in the cmdlet - can one of you take a look?

maddieclayton avatar Mar 02 '19 09:03 maddieclayton

The problem actually lies in the Swagger and SDK and how we are generating the calls used in this cmdlet. It's a bug we have in our backlog, we just need to get it prioritized.

refortie avatar Mar 04 '19 23:03 refortie

Ran into this at a customer today. Any quick workarounds we can utilize?

samsmithnz avatar Jan 31 '20 14:01 samsmithnz

Can we use Test-AzLogicApp instead?

vicperdana avatar Oct 30 '20 03:10 vicperdana

I don't think that this problem was solved, correct?

mdurini avatar Mar 09 '21 08:03 mdurini

Is this issue still not fixed? I'm desperatly trying to create a powershell script which is basically missing the connections and will not work without.

chwilfing avatar Sep 28 '21 08:09 chwilfing

@rarayudu Do you have any updates on this issue.

SaurabhSharma-MSFT avatar Nov 15 '21 23:11 SaurabhSharma-MSFT

I think this issue still exists. I use New-AzLogicApp and Set-AzLogicApp commands to create and update logic apps with -Parameters. It does not work. Az.LogicApp version = 1.5.0 I store the parameter value in a json file and use -ParameterFilePath argument instead

mingsoap avatar Jan 23 '22 02:01 mingsoap

What a shame, this issue is open since... nearly 3 years.

chwilfing avatar Jan 24 '22 13:01 chwilfing

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/azure-logicapps-team.

Issue Details

Description

The 'Start-AzLogicApp' command has a 'Parameters' parameter that 'Specifies a parameters collection object of the logic app. Specify a hash table, Dictionary, or Dictionary<string, WorkflowParameter>'. However, it seems the parameters are not passed into the Logic App.

Steps to reproduce

Example script:

$lAppParamObj = @{ 'paramRequestorFirstName' = "TestParameterPassedIn"}

Start-AzLogicApp `
     -ResourceGroupName "test-rg" `
     -Name "TestLogicApp" `
     -Parameters $lAppParamObj `
     -TriggerName "manual"

Logic App parameters definition

"parameters": {
            "$connections": {
                "defaultValue": {},
                "type": "Object"
            },
            "paramRequestorFirstName": {                
                "defaultValue": "test123",
                "type": "string"
            }
        },

Initilising a variable within Logic App definition

"Initialize_variable_2": {
                "inputs": {
                    "variables": [
                        {
                            "name": "RequestorFirstName",
                            "type": "String",
                            "value": "@{parameters('paramRequestorFirstName')}"
                        }
                    ]
                },
                "runAfter": {},
                "type": "InitializeVariable"
            },

The variable returns "test123" instead of "TestParameterPassedIn"

Author: mehowq
Assignees: rarayudu, refortie
Labels:

Logic App, Service Attention, bug, customer-reported

Milestone: -

ghost avatar Feb 24 '22 10:02 ghost

@mehowq Apologies for the late reply. We are looking into this issue and we will update this thread once we have more details on this.

@Azure/azure-logicapps-team Could you please provide an update on this ? Awaiting your reply.

navba-MSFT avatar Feb 24 '22 10:02 navba-MSFT

Just tried this, still doesn't seem to be fixed.

freddiecode avatar Mar 12 '24 07:03 freddiecode

This is still a problem in the latest version (1.6.0). Any news when we can expect this to be fixed? It's been quite some time since it was reported. Is there any workarounds/alternatives when you want to start a logic app (with parameter data) using Powershell? @navba-MSFT

ChristofferLB avatar Mar 20 '25 07:03 ChristofferLB

:bell: Routing this issue to @act-observability-squad.