{
    "id": "AzureActivity",
    "title": "Azure Activity",
    "publisher": "Microsoft",
    "descriptionMarkdown": "Azure Activity Log is a subscription log that provides insight into subscription-level events that occur in Azure, including events from Azure Resource Manager operational data, service health events, write operations taken on the resources in your subscription, and the status of activities performed in Azure. For more information, see the [Microsoft Sentinel documentation ](https://go.microsoft.com/fwlink/p/?linkid=2219695&wt.mc_id=sentinel_dataconnectordocs_content_cnl_csasci).",
    "logo": "AzureActivity.svg",
    "lastDataReceivedInfoBalloon": "If no new data has been received in the last 14 days, the connector will display as being \"not connected.\" When the connector will recive data , the \"connected\" status will return.",
    "graphQueries": [
      {
        "metricName": "Total data received",
        "legend": "AzureActivity",
        "baseQuery": "AzureActivity"
      }
    ],
    "sampleQueries": [
      {
        "description": "All logs",
        "query": "AzureActivity \n| take 1000"
      },
      {
        "description": "Summarize by 1 hour bins",
        "query": "AzureActivity\n            | summarize count() by bin(TimeGenerated, 1h)\n            | sort by TimeGenerated"
      }
    ],
    "connectivityCriterias": [
      {
        "type": "IsConnectedQuery",
        "value": [
          "AzureActivity\n            | summarize LastLogReceived = max(TimeGenerated)\n            | project IsConnected = LastLogReceived > ago(7d)"
        ]
      }
    ],
    "dataTypes": [
      {
        "name": "AzureActivity",
        "lastDataReceivedQuery": "AzureActivity\n            | summarize Time = max(TimeGenerated)\n            | where isnotempty(Time)"
      }
    ],
    "availability": {
      "status": 1,
      "isPreview": false
    },
    "permissions": {
      "resourceProvider": [
        {
          "provider": "Microsoft.OperationalInsights/workspaces",
          "permissionsDisplayText": "read and write permissions.",
          "providerDisplayName": "Workspace",
          "scope": "Workspace",
          "requiredPermissions": {
            "read": true,
            "write": true,
            "delete": true
          }
        }
      ],
      "customs": [
        {
          "name": "Policy​",
          "description": "owner role assigned for each policy assignment scope.​"
        },
        {
          "name": "Subscription",
          "description": "owner role permission on the relevant subscription"
        }
      ]
    },
    "instructionSteps": [
      {
        "instructions": [
          {
            "parameters": {
              "text": "This connector has been updated to use the diagnostics settings back-end pipeline. which provides increased functionality and better consistency with resource logs.\nConnectors using this pipeline can also be governed at scale by Azure Policy. Learn more about the new <a href=\"https://docs.microsoft.com/azure/sentinel/connect-azure-activity\">Azure Activity connector</a>.\nFollow the instructions below to upgrade your connector to the diagnostics settings pipeline.",
              "visible": true,
              "inline": false
            },
            "type": "InfoMessage"
          }
        ]
      },
      {
        "title": "1. Disconnect your subscriptions from the legacy method",
        "description": "The subscriptions listed below are still using the older, legacy method. You are strongly encouraged to upgrade to the new pipeline.<br>\nTo do this, click on the 'Disconnect All' button below, before proceeding to launch the Azure Policy Assignment wizard.",
        "instructions": [
          {
            "parameters": {
              "datasourceName": "AzureActivityLog"
            },
            "type": "OmsDatasource"
          }
        ]
      },
      {
        "title": "2.  Connect your subscriptions through diagnostic settings new pipeline",
        "description": "This connector uses Azure Policy to apply a single Azure Subscription log-streaming configuration to a collection of subscriptions, defined as a scope.\nFollow the instructions below to create and apply a policy to all current and future subscriptions. **Note**, you may already have an active policy for this resource type.",
        "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 resources assignment scope.\n        >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 and metric types you want to ingest.\n        >3. To apply the policy on your existing resources, select the **Remediation tab** and mark the **Create a remediation task** checkbox.",
            "instructions": [
              {
                "parameters": {
                  "linkType": "OpenPolicyAssignment",
                  "policyDefinitionGuid": "2465583e-4e78-4c15-b6be-a36cbc7c8b0f",
                  "assignMode": 1
                },
                "type": "InstallAgent"
              }
            ]
          }
        ]
      }
    ],
    "metadata": {
        "id": "56a9f1b9-6cc2-4a65-b3bf-1c39bb47c09b",
        "version": "2.0.0",
        "kind": "dataConnector",
        "source": {
            "kind": "community"
        },
        "author": {
            "name": "Microsoft"
        },
        "support": {
            "tier": "community",
            "name": "Microsoft",
            "link":"https://github.com/Azure/Azure-Sentinel/issues"
        }
    }
}
