Azure / LogicAppsUX

https://learn.microsoft.com/azure/logic-apps
MIT License
74 stars 81 forks source link

Manage Identity: Failed to retrieve dynamic inputs #5512

Closed vgouth closed 2 weeks ago

vgouth commented 3 weeks ago

Describe the Bug with repro steps

1.Create a Standard Logic app in Brazil South location and add stateful workflow.

2.Go to the Identity tab in the Logic App and turn on System Assigned Identity (if it is in off state)

b) Navigate back to the Logic Apps designer tab

c) Add a request trigger. Then, add the Azure Automation with MI (laborbol) connector and choose the "Create job" operation

d) From the "Authentication type" dropdown, select "Logic Apps Managed Identity". There should be no errors shown on the card.

Note: Other connections already exist in this resource group so the “Cancel” button is shown. If no other connections existed, there would only be an option to “Create” here and no “Cancel” button.

e) Enter a valid connection name (any string) and the Create button should become enabled

f) Click on create and it should succeed and you should then see the below which has the Managed identity dropdown with "System-assigned managed identity" as the selected option.

g) Enter some dummy values using "Enter custom value" option in each of the required fields and save the workflow. Navigate to the Connections tab in the Logic and click on the "JSON View" tab and expect to see the below. Verify that all the properties in the image below are present for your connection reference as well.

h) Navigate back to the Designer and clear out the custom values you entered in the required fields in the 'Create job' action. Then, expand the “Subscription” dropdown on the same action. It should say “No Items”. Do not save the Logic App this time.

i) Navigate to your Azure Automation resource you had created in the pre-requisites for these test cases in the portal and in Access control (IAM), add a role

assignment to give Contributor access to your Logic App's System Assigned Managed Identity. Also, navigate to the Resource Group that the Azure Automation resource you created is in and give Contributor access to your Logic App's System Assigned Managed Identity in the Resource Group as well.

j) Navigate back to the Designer in your Logic App.

k) Now, when you expand the "Subscription" dropdown, you should see the first option as the subscription that your Azure Automation resource was created in.

l) Now, fill in the rest of the required fields for the action (Subscription, resource group, automation account). Also add the "Runbook Name" parameter from the "Add a parameter" dropdown and select the Runbook you had created in the pre-requisites for these test cases.

Expected: Should be able to fill the required fields for the action (Subscription, resource group, automation account). Also add the "Runbook Name" parameter from the "Add a parameter" dropdown and select the Runbook you had created in the pre-requisites for these test cases.

Actual: Not able to fill the required fields for the action (Subscription, resource group, automation account). Also not able to add the "Runbook Name" parameter from the "Add a parameter" dropdown and select the Runbook you had created in the pre-requisites for these test cases. Getting the error message "Failed to retrieve dynamic inputs. Error details: 'Error occurred while executing the following API parameters: '/subscriptions/abc/resourceGroups/mno/providers/Microsoft.Automation/automationAccounts/pqr/runbooks/''

Able to retrieve dynamic inputs in production portal with same logic app.

What type of Logic App Is this happening in?

Standard (Portal)

Which operating system are you using?

Windows

Are you using new designer or old designer

New Designer

Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg

Yes

Workflow JSON

{
    "definition": {
        "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
        "actions": {
            "Create_job": {
                "inputs": {
                    "host": {
                        "connection": {
                            "referenceName": "azureautomation-mi-laborbol"
                        }
                    },
                    "method": "put",
                    "path": "/subscriptions/@{encodeURIComponent('abc')}/resourceGroups/@{encodeURIComponent('mno')}/providers/Microsoft.Automation/automationAccounts/@{encodeURIComponent('pqr')}/jobs",
                    "queries": {
                        "wait": false,
                        "x-ms-api-version": "2015-10-31"
                    }
                },
                "runAfter": {},
                "type": "ApiConnection"
            }
        },
        "contentVersion": "1.0.0.0",
        "outputs": {},
        "triggers": {
            "When_a_HTTP_request_is_received": {
                "kind": "Http",
                "type": "Request"
            }
        }
    },
    "kind": "Stateful"
}

Screenshots or Videos

image

Role Assigned :

image

Working fine in production with same logic app:

image

Browser

Edge

Additional context

Version: 2.40826.1.3

ccastrotrejo commented 3 weeks ago

Hi @vgouth is there any specific reason on why you are writting down custom values in the parameters?

vgouth commented 3 weeks ago

@ccastrotrejo 1.Yes, there is specific reason to write the custom values. We have to give custom vales first and then as per this test point "Navigate to your Azure Automation resource you had created in the pre-requisites for these test cases in the portal and in Access control (IAM), add a role assignment to give Contributor access to your Logic App's System Assigned Managed Identity. Also, navigate to the Resource Group that the Azure Automation resource you created is in and give Contributor access to your Logic App's System Assigned Managed Identity in the Resource Group as well. Once this access is given we have to see the subscription. Resource group and Automation Account in designer. This is working fine in production environment. But in staging it is failing to retrieve the dynamic values. 2.Yes, this is new workflow which was created in staging environment and checked with same workflow in production environment.