{
    "name": "HalcyonPushV2",
    "apiVersion": "2025-07-01-preview",
    "type": "Microsoft.SecurityInsights/dataConnectorDefinitions",
    "location": "{{location}}",
    "kind": "Customizable",
    "properties": {
      "connectorUiConfig": {
        "id": "HalcyonPushV2",
        "title": "Halcyon Connector (v2)",
        "publisher": "Halcyon",
        "logo": "halcyon.svg",
        "descriptionMarkdown": "The [Halcyon](https://www.halcyon.ai) connector provides the capability to send data from Halcyon to Microsoft Sentinel. This v2 connector ingests Halcyon Events into `HalcyonEventsV2_CL` and Alert Updates into `HalcyonAlertUpdatesV2_CL`.",
        "sampleQueries": [
          {
            "description": "View recent events",
            "query": "HalcyonEventsV2_CL\n| where TimeGenerated > ago(24h)\n| sort by TimeGenerated desc\n"
          },
          {
            "description": "View recent alert updates",
            "query": "HalcyonAlertUpdatesV2_CL\n| where TimeGenerated > ago(24h)\n| sort by TimeGenerated desc\n"
          }
        ],
        "graphQueries": [
          {
            "metricName": "Events",
            "legend": "HalcyonEventsV2_CL",
            "baseQuery": "HalcyonEventsV2_CL"
          },
          {
            "metricName": "Alert Updates",
            "legend": "HalcyonAlertUpdatesV2_CL",
            "baseQuery": "HalcyonAlertUpdatesV2_CL"
          }
        ],
        "dataTypes": [
          {
            "name": "Halcyon Events",
            "lastDataReceivedQuery": "HalcyonEventsV2_CL\n | summarize Time = max(TimeGenerated)\n | where isnotempty(Time)"
          },
          {
            "name": "Halcyon Alert Updates",
            "lastDataReceivedQuery": "HalcyonAlertUpdatesV2_CL\n | summarize Time = max(TimeGenerated)\n | where isnotempty(Time)"
          }
        ],
        "connectivityCriteria": [
          {
            "type": "IsConnectedQuery",
            "value": [
              "union isfuzzy=true (HalcyonEventsV2_CL | summarize LastLogReceived = max(TimeGenerated)), (HalcyonAlertUpdatesV2_CL | summarize LastLogReceived = max(TimeGenerated)) | summarize LastLogReceived = max(LastLogReceived) | project IsConnected = LastLogReceived > ago(7d)"
            ]
          }
        ],
        "availability": {
          "isPreview": true
        },
        "permissions": {
          "resourceProvider": [
            {
              "provider": "Microsoft.OperationalInsights/workspaces",
              "permissionsDisplayText": "Read and Write permissions are required.",
              "providerDisplayName": "Workspace Permissions",
              "scope": "Workspace",
              "requiredPermissions": {
                "write": true,
                "read": true,
                "delete": false
              }
            }
          ],
          "customs": [
            {
              "name": "Microsoft Entra Create Permissions",
              "description": "Permissions to create an app registration in Microsoft Entra ID. Typically requires Entra ID Application Developer role or higher."
            },
            {
              "name": "Role Assignment Permissions",
              "description": "Write permissions required to assign Monitoring Metrics Publisher role to the data collection rule (DCR). Typically requires Owner or User Access Administrator role at the resource group level."
            }
          ]
        },
        "instructionSteps": [
          {
            "title": "1. Create ARM Resources and Provision Required Permissions",
            "description": "Clicking \"Deploy\" creates the Log Analytics tables (HalcyonEventsV2_CL and HalcyonAlertUpdatesV2_CL) and a Data Collection Rule (DCR), then creates an Entra application linked to the DCR and provisions the required permissions. Once configured, Halcyon pushes Events and Alert Updates to the DCR endpoint, ingesting them into the HalcyonEventsV2_CL and HalcyonAlertUpdatesV2_CL tables.",
            "instructions": [
              {
                "type": "Markdown",
                "parameters": {
                  "content": "#### Automated Configuration and Secure Data Ingestion with Entra Application \nClicking on \"Deploy\" will trigger the creation of Log Analytics tables and a Data Collection Rule (DCR). \nIt will then create an Entra application, link the DCR to it, and set the entered secret in the application. This setup enables data to be sent securely to the DCR using an Entra token."
                }
              },
              {
                "parameters": {
                  "label": "Deploy Halcyon Connector Resources",
                  "applicationDisplayName": "Halcyon Sentinel Connector v2"
                },
                "type": "DeployPushConnectorButton"
              }
            ]
          },
          {
            "title": "2. Configure your integration in the Halcyon Platform",
            "description": "Use the following parameters to configure your integration in the Halcyon Platform.",
            "instructions": [
              {
                "parameters": {
                  "label": "Directory ID (Tenant ID)",
                  "fillWith": [
                    "TenantId"
                  ]
                },
                "type": "CopyableLabel"
              },
              {
                "parameters": {
                  "label": "Entra App Registration Application ID (Client ID)",
                  "fillWith": [
                    "ApplicationId"
                  ],
                  "placeholder": "Deploy the Push Connector to get the App Registration Application ID"
                },
                "type": "CopyableLabel"
              },
              {
                "parameters": {
                  "label": "Entra App Registration Secret (Credential Secret) (THIS SECRET WILL NOT BE VISIBLE AFTER LEAVING THIS PAGE)",
                  "fillWith": [
                    "ApplicationSecret"
                  ],
                  "placeholder": "Deploy the Push Connector to get the App Registration Secret"
                },
                "type": "CopyableLabel"
              },
              {
                "parameters": {
                  "label": "Data Collection Endpoint (URL)",
                  "fillWith": [
                    "DataCollectionEndpoint"
                  ],
                  "placeholder": "Deploy the Push Connector to get the Data Collection Endpoint"
                },
                "type": "CopyableLabel"
              },
              {
                "parameters": {
                  "label": "Data Collection Rule ID (Rule ID)",
                  "fillWith": [
                    "DataCollectionRuleId"
                  ],
                  "placeholder": "Deploy the Push Connector to get the Data Collection Rule ID"
                },
                "type": "CopyableLabel"
              }
            ]
          }
        ]
      }
    }
  }
