{
    "name": "SynqlyIntegrationConnector",
    "apiVersion": "2025-07-01-preview",
    "type": "Microsoft.SecurityInsights/dataConnectorDefinitions",
    "location": "{{location}}",
    "kind": "Customizable",
    "properties": {
        "connectorUiConfig": {
            "id": "SynqlyIntegrationConnector",
            "title": "Synqly Integration Connector",
            "publisher": "Synqly",
            "logo": "https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/Logos/Synqly.svg",
            "descriptionMarkdown": "The [Synqly](https://synqly.com) connector provides the capability to push security events and asset entities from Synqly integrations into Microsoft Sentinel using the Azure Logs Ingestion API. Records are automatically normalized to ASIM (Advanced Security Information Model) tables for use with Microsoft Sentinel analytics, workbooks, and hunting queries.",
            "graphQueries": [
                {
                    "metricName": "Total Records Received",
                    "legend": "Records",
                    "baseQuery": "union ASimAgentEventLogs, ASimAlertEventLogs, ASimAssetEntityLogs, ASimAuditEventLogs, ASimAuthenticationEventLogs, ASimDhcpEventLogs, ASimDnsActivityLogs, ASimFileEventLogs, ASimNetworkSessionLogs, ASimProcessEventLogs, ASimRegistryEventLogs, ASimUserManagementActivityLogs, ASimWebSessionLogs | where AdditionalFields._ConnectorId == 'SynqlySentinelASIMConnector'"
                }
            ],
            "sampleQueries": [
                {
                    "description": "View recent audit events",
                    "query": "ASimAuditEventLogs | where TimeGenerated > ago(24h) and AdditionalFields._ConnectorId == 'SynqlySentinelASIMConnector' | take 10"
                },
                {
                    "description": "View recent authentication events",
                    "query": "ASimAuthenticationEventLogs | where TimeGenerated > ago(24h) and AdditionalFields._ConnectorId == 'SynqlySentinelASIMConnector' | take 10"
                },
                {
                    "description": "View recent network sessions",
                    "query": "ASimNetworkSessionLogs | where TimeGenerated > ago(24h) and AdditionalFields._ConnectorId == 'SynqlySentinelASIMConnector' | take 10"
                },
                {
                    "description": "View all supported schema types received",
                    "query": "union withsource=SourceTable ASimAgentEventLogs, ASimAlertEventLogs, ASimAssetEntityLogs, ASimAuditEventLogs, ASimAuthenticationEventLogs, ASimDhcpEventLogs, ASimDnsActivityLogs, ASimFileEventLogs, ASimNetworkSessionLogs, ASimProcessEventLogs, ASimRegistryEventLogs, ASimUserManagementActivityLogs, ASimWebSessionLogs | where TimeGenerated > ago(7d) and AdditionalFields._ConnectorId == 'SynqlySentinelASIMConnector' | extend SchemaType = SourceTable | summarize count() by SchemaType | order by count_ desc"
                },
                {
                    "description": "View ingestion rate by schema type",
                    "query": "union withsource=SourceTable ASimAgentEventLogs, ASimAlertEventLogs, ASimAssetEntityLogs, ASimAuditEventLogs, ASimAuthenticationEventLogs, ASimDhcpEventLogs, ASimDnsActivityLogs, ASimFileEventLogs, ASimNetworkSessionLogs, ASimProcessEventLogs, ASimRegistryEventLogs, ASimUserManagementActivityLogs, ASimWebSessionLogs | where TimeGenerated > ago(24h) and AdditionalFields._ConnectorId == 'SynqlySentinelASIMConnector' | extend SchemaType = SourceTable | summarize count() by bin(TimeGenerated, 1h), SchemaType | render timechart"
                },
                {
                    "description": "Query using ASIM parser (recommended)",
                    "query": "imAuthentication | where TimeGenerated > ago(24h) | take 10"
                }
            ],
            "dataTypes": [
                {
                    "name": "ASimAgentEventLogs",
                    "lastDataReceivedQuery": "ASimAgentEventLogs | where TimeGenerated > ago(7d) and AdditionalFields._ConnectorId == 'SynqlySentinelASIMConnector' | summarize Time = max(TimeGenerated) | where isnotempty(Time)"
                },
                {
                    "name": "ASimAlertEventLogs",
                    "lastDataReceivedQuery": "ASimAlertEventLogs | where TimeGenerated > ago(7d) and AdditionalFields._ConnectorId == 'SynqlySentinelASIMConnector' | summarize Time = max(TimeGenerated) | where isnotempty(Time)"
                },
                {
                    "name": "ASimAssetEntityLogs",
                    "lastDataReceivedQuery": "ASimAssetEntityLogs | where TimeGenerated > ago(7d) and AdditionalFields._ConnectorId == 'SynqlySentinelASIMConnector' | summarize Time = max(TimeGenerated) | where isnotempty(Time)"
                },
                {
                    "name": "ASimAuditEventLogs",
                    "lastDataReceivedQuery": "ASimAuditEventLogs | where TimeGenerated > ago(7d) and AdditionalFields._ConnectorId == 'SynqlySentinelASIMConnector' | summarize Time = max(TimeGenerated) | where isnotempty(Time)"
                },
                {
                    "name": "ASimAuthenticationEventLogs",
                    "lastDataReceivedQuery": "ASimAuthenticationEventLogs | where TimeGenerated > ago(7d) and AdditionalFields._ConnectorId == 'SynqlySentinelASIMConnector' | summarize Time = max(TimeGenerated) | where isnotempty(Time)"
                },
                {
                    "name": "ASimDhcpEventLogs",
                    "lastDataReceivedQuery": "ASimDhcpEventLogs | where TimeGenerated > ago(7d) and AdditionalFields._ConnectorId == 'SynqlySentinelASIMConnector' | summarize Time = max(TimeGenerated) | where isnotempty(Time)"
                },
                {
                    "name": "ASimDnsActivityLogs",
                    "lastDataReceivedQuery": "ASimDnsActivityLogs | where TimeGenerated > ago(7d) and AdditionalFields._ConnectorId == 'SynqlySentinelASIMConnector' | summarize Time = max(TimeGenerated) | where isnotempty(Time)"
                },
                {
                    "name": "ASimFileEventLogs",
                    "lastDataReceivedQuery": "ASimFileEventLogs | where TimeGenerated > ago(7d) and AdditionalFields._ConnectorId == 'SynqlySentinelASIMConnector' | summarize Time = max(TimeGenerated) | where isnotempty(Time)"
                },
                {
                    "name": "ASimNetworkSessionLogs",
                    "lastDataReceivedQuery": "ASimNetworkSessionLogs | where TimeGenerated > ago(7d) and AdditionalFields._ConnectorId == 'SynqlySentinelASIMConnector' | summarize Time = max(TimeGenerated) | where isnotempty(Time)"
                },
                {
                    "name": "ASimProcessEventLogs",
                    "lastDataReceivedQuery": "ASimProcessEventLogs | where TimeGenerated > ago(7d) and AdditionalFields._ConnectorId == 'SynqlySentinelASIMConnector' | summarize Time = max(TimeGenerated) | where isnotempty(Time)"
                },
                {
                    "name": "ASimRegistryEventLogs",
                    "lastDataReceivedQuery": "ASimRegistryEventLogs | where TimeGenerated > ago(7d) and AdditionalFields._ConnectorId == 'SynqlySentinelASIMConnector' | summarize Time = max(TimeGenerated) | where isnotempty(Time)"
                },
                {
                    "name": "ASimUserManagementActivityLogs",
                    "lastDataReceivedQuery": "ASimUserManagementActivityLogs | where TimeGenerated > ago(7d) and AdditionalFields._ConnectorId == 'SynqlySentinelASIMConnector' | summarize Time = max(TimeGenerated) | where isnotempty(Time)"
                },
                {
                    "name": "ASimWebSessionLogs",
                    "lastDataReceivedQuery": "ASimWebSessionLogs | where TimeGenerated > ago(7d) and AdditionalFields._ConnectorId == 'SynqlySentinelASIMConnector' | summarize Time = max(TimeGenerated) | where isnotempty(Time)"
                }
            ],
            "connectivityCriteria": [
                {
                    "type": "IsConnectedQuery",
                    "value": [
                        "union ASimAgentEventLogs, ASimAlertEventLogs, ASimAssetEntityLogs, ASimAuditEventLogs, ASimAuthenticationEventLogs, ASimDhcpEventLogs, ASimDnsActivityLogs, ASimFileEventLogs, ASimNetworkSessionLogs, ASimProcessEventLogs, ASimRegistryEventLogs, ASimUserManagementActivityLogs, ASimWebSessionLogs | where AdditionalFields._ConnectorId == 'SynqlySentinelASIMConnector' | summarize LastLogReceived = max(TimeGenerated) | project IsConnected = LastLogReceived > ago(7d)"
                    ]
                }
            ],
            "availability": {
                "status": 1
            },
            "permissions": {
                "resourceProvider": [
                    {
                        "provider": "Microsoft.OperationalInsights/workspaces",
                        "permissionsDisplayText": "Read and Write permissions are required for the Log Analytics workspace.",
                        "providerDisplayName": "Workspace",
                        "scope": "Workspace",
                        "requiredPermissions": {
                            "write": true,
                            "read": true,
                            "delete": true
                        }
                    }
                ],
                "customs": [
                    {
                        "name": "Microsoft Entra ID",
                        "description": "Application Developer role (or higher) to create app registrations."
                    },
                    {
                        "name": "Microsoft Azure",
                        "description": "Owner or User Access Administrator role on the resource group to deploy DCR and assign Monitoring Metrics Publisher role."
                    }
                ]
            },
            "instructionSteps": [
                {
                    "title": "1. Create ARM Resources and Provide the Required Permissions",
                    "description": "This connector enables push-based ingestion of security events and asset entities from Synqly integrations into Microsoft Sentinel. Records are automatically normalized to ASIM (Advanced Security Information Model) tables.",
                    "instructions": [
                        {
                            "type": "Markdown",
                            "parameters": {
                                "content": "#### Deploy Connector Resources\nClicking \"Deploy\" creates a Data Collection Rule (DCR), Data Collection Endpoint (DCE), and Entra application with the necessary permissions to securely send data to Microsoft Sentinel."
                            }
                        },
                        {
                            "parameters": {
                                "label": "Deploy Synqly Integration connector resources",
                                "applicationDisplayName": "Synqly Integration Connector Application"
                            },
                            "type": "DeployPushConnectorButton"
                        }
                    ]
                },
                {
                    "title": "2. Grant Additional Permissions (Based on Use Case)",
                    "description": "Additional roles may be required depending on how you plan to use Synqly with Microsoft Sentinel.",
                    "instructions": [
                        {
                            "type": "Markdown",
                            "parameters": {
                                "content": "**Sink Connector (Write-Only)**: No additional permissions needed.\n\n**SIEM Connector (Read/Write)**: Assign **Microsoft Sentinel Contributor** role to the Entra application via the Azure UI in your Log Analytics workspace.\n\nSee [Synqly documentation](https://docs.synqly.com/guides/provider-configuration/microsoft-sentinel-siem-setup) for detailed setup guides."
                            }
                        }
                    ]
                },
                {
                    "title": "3. Push your logs into the workspace",
                    "description": "Provide these parameters to your Synqly integration. Synqly formats each record for one of 13 supported ASIM schema types: 12 event schemas (AgentEvent, AlertEvent, AuditEvent, Authentication, DhcpEvent, Dns, FileEvent, NetworkSession, ProcessEvent, RegistryEvent, UserManagement, and WebSession) and the Asset entity schema (EntitySchema=Asset).",
                    "instructions": [
                        {
                            "type": "Markdown",
                            "parameters": {
                                "content": "**Important**: Records with unsupported schema types are silently dropped by Azure. If expected data is not appearing, verify with your Synqly integration provider that records use one of the supported schema types listed above."
                            }
                        },
                        {
                            "parameters": {
                                "label": "Tenant ID (Directory ID)",
                                "fillWith": [
                                    "TenantId"
                                ]
                            },
                            "type": "CopyableLabel"
                        },
                        {
                            "parameters": {
                                "label": "Entra App Registration Application ID",
                                "fillWith": [
                                    "ApplicationId"
                                ],
                                "placeholder": "Deploy push connector to get the App Registration Application ID"
                            },
                            "type": "CopyableLabel"
                        },
                        {
                            "parameters": {
                                "label": "Entra App Registration Secret",
                                "fillWith": [
                                    "ApplicationSecret"
                                ],
                                "placeholder": "Deploy push connector to get the App Registration Secret"
                            },
                            "type": "CopyableLabel"
                        },
                        {
                            "parameters": {
                                "label": "Data Collection Endpoint Uri",
                                "fillWith": [
                                    "DataCollectionEndpoint"
                                ],
                                "placeholder": "Deploy push connector to get the Data Collection Endpoint Uri"
                            },
                            "type": "CopyableLabel"
                        },
                        {
                            "parameters": {
                                "label": "Data Collection Rule Immutable ID",
                                "fillWith": [
                                    "DataCollectionRuleId"
                                ],
                                "placeholder": "Deploy push connector to get the Data Collection Rule Immutable ID"
                            },
                            "type": "CopyableLabel"
                        },
                        {
                            "parameters": {
                                "label": "Stream Name",
                                "value": "Custom-SynqlyASIM"
                            },
                            "type": "CopyableLabel"
                        }
                    ]
                },
                {
                    "title": "4. Promote Alert Events to Microsoft Sentinel alerts (Optional)",
                    "description": "The solution includes the Synqly Alert Event analytics rule template. Alert Events remain logs until you create and enable a rule from it.",
                    "instructions": [
                        {
                            "type": "Markdown",
                            "parameters": {
                                "content": "Go to **Microsoft Sentinel > Analytics > Rule templates**, find **Synqly Alert Event**, and select **Create rule**. Use the defaults or customize the rule for your environment. [Learn more](https://learn.microsoft.com/en-us/azure/sentinel/create-analytics-rule-from-template)."
                            }
                        }
                    ]
                }
            ]
        }
    }
}
