{
  "id": "AzureLogicApps_CCP",
  "title": "Azure Logic Apps",
  "publisher": "Microsoft",
  "descriptionMarkdown": "Azure Logic Apps is a cloud-based platform for creating and running automated workflows that integrate your apps, data, services, and systems. This connector lets you stream your Azure Logic Apps diagnostics logs into Microsoft Sentinel, allowing you to continuously monitor activity. ",
  "graphQueries": [
    {
      "metricName": "Total data received",
      "legend": "AzureDiagnostics",
      "baseQuery": "AzureDiagnostics| where ResourceProvider == \"MICROSOFT.LOGIC\""
    }
  ],
  "sampleQueries": [
    {
      "description": "All logs",
      "query": "AzureDiagnostics \n| where ResourceProvider == \"MICROSOFT.LOGIC\" \n"
    },
    {
      "description": "Count By Workflows",
      "query": "AzureDiagnostics \n| where ResourceProvider == \"MICROSOFT.LOGIC\" \n| summarize count() by resource_workflowName_s"
    }
  ],
  "connectivityCriterias": [
    {
      "type": "IsConnectedQuery",
      "value": [
        "AzureDiagnostics | where ResourceProvider == \"MICROSOFT.LOGIC\"\n | summarize LastLogReceived = max(TimeGenerated)\n | project IsConnected = LastLogReceived > ago(7d)"
      ]
    }
  ],
  "dataTypes": [
    {
      "name": "AzureDiagnostics (Logic Apps)",
      "lastDataReceivedQuery": "AzureDiagnostics| where ResourceProvider == \"MICROSOFT.LOGIC\" | summarize Time = max(TimeGenerated) | where isnotempty(Time)"
    }
  ],
  "availability": {
    "status": 1,
    "isPreview": false
  },
  "permissions": {
    "resourceProvider": [
      {
        "provider": "Microsoft.OperationalInsights/workspaces",
        "permissionsDisplayText": "read and write permissions are required.",
        "providerDisplayName": "Workspace",
        "scope": "Workspace",
        "requiredPermissions": {
          "write": true,
          "read": true,
          "delete": true
        }
      }
    ],
    "customs": [
      {
        "name": "Policy",
        "description": "owner role assigned for each policy assignment scope"
      }
    ]
  },
  "instructionSteps": [
    {
      "title": "Connect your Logic Apps diagnostics logs into Sentinel.",
      "description": "This connector uses Azure Policy to apply a single Azure Logic Apps log-streaming configuration to a collection of instances, defined as a scope. Follow the instructions below to create and apply a policy to all current and future instances. Note, you may already have an active policy for this resource type.",
      "instructions": [
        {
          "parameters": {
            "noFxPadding": "1",
            "expanded": "1",
            "instructionSteps": [
              {
                "title": "Stream diagnostics logs from your Azure Logic Apps at scale",
                "innerSteps": [
                  {
                    "title": "Launch the Azure Policy Assignment wizard and follow the steps. ",
                    "description": ">    1. In the **Basics** tab, click the button with the three dots under **Scope** to select your subscription.<br />2. In the **Parameters** tab, choose your Microsoft Sentinel workspace from the **Log Analytics workspace** drop-down list, and leave marked as \"True\" all the log categories you want to ingest.<br />3. To apply the policy on your existing resources, mark the **Create a remediation task** check box in the **Remediation** tab.</value>",
                    "instructions": [
                      {
                        "parameters": {
                          "policyDefinitionGuid": "b889a06c-ec72-4b03-910a-cb169ee18721"
                        },
                        "type": "PolicyAssignment"
                      }
                    ]
                  }
                ]
              }
            ]
          },
          "type": "InstructionStepsGroup"
        }
      ]
    }
  ]
}