let highRisk = 3;
let legal = 'Legal Information';
CognniIncidents_CL 
| where Severity == highRisk
| where informationType_s == legal
| where TimeGenerated >= ago(5h)
| extend AccountCustomEntity = userId_s
kind: Scheduled
entityMappings:
- entityType: Account
  fieldMappings:
  - columnName: AccountCustomEntity
    identifier: FullName
description: |
    'Display incidents in which highly sensitive legal information was placed at risk by user sharing.'
severity: High
queryFrequency: 5h
triggerThreshold: 0
relevantTechniques:
- T1530
status: Available
tactics:
- Collection
name: Cognni Incidents for Highly Sensitive Legal Information
id: 4f45f43b-3a4b-491b-9cbe-d649603384aa
query: |
  let highRisk = 3;
  let legal = 'Legal Information';
  CognniIncidents_CL 
  | where Severity == highRisk
  | where informationType_s == legal
  | where TimeGenerated >= ago(5h)
  | extend AccountCustomEntity = userId_s  
requiredDataConnectors:
- dataTypes:
  - CognniIncidents_CL
  connectorId: CognniSentinelDataConnector
version: 1.0.0
triggerOperator: gt
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Cognni/Analytic Rules/CognniHighRiskLegalIncidents.yaml
queryPeriod: 5h
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workspace": {
      "type": "String"
    }
  },
  "resources": [
    {
      "apiVersion": "2024-01-01-preview",
      "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/4f45f43b-3a4b-491b-9cbe-d649603384aa')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/4f45f43b-3a4b-491b-9cbe-d649603384aa')]",
      "properties": {
        "alertRuleTemplateName": "4f45f43b-3a4b-491b-9cbe-d649603384aa",
        "customDetails": null,
        "description": "'Display incidents in which highly sensitive legal information was placed at risk by user sharing.'\n",
        "displayName": "Cognni Incidents for Highly Sensitive Legal Information",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "Account",
            "fieldMappings": [
              {
                "columnName": "AccountCustomEntity",
                "identifier": "FullName"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Cognni/Analytic Rules/CognniHighRiskLegalIncidents.yaml",
        "query": "let highRisk = 3;\nlet legal = 'Legal Information';\nCognniIncidents_CL \n| where Severity == highRisk\n| where informationType_s == legal\n| where TimeGenerated >= ago(5h)\n| extend AccountCustomEntity = userId_s\n",
        "queryFrequency": "PT5H",
        "queryPeriod": "PT5H",
        "severity": "High",
        "status": "Available",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "Collection"
        ],
        "techniques": [
          "T1530"
        ],
        "templateVersion": "1.0.0",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}