Microsoft Sentinel Analytic Rules
cloudbrothers.infoAzure Sentinel RepoToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Power Automate - Departing employee flow activity

Back
Idb1e11b8c-545a-4dea-a912-0008e160d183
RulenamePower Automate - Departing employee flow activity
DescriptionIdentifies instances where an employee who has been notified or is already terminated, on the TerminatedEmployees watchlist, creates or modifies a Power Automate flow.
SeverityHigh
TacticsExfiltration
Impact
TechniquesT1567
T1485
T1491
T0813
T0879
T0826
Required data connectorsPowerAutomate
KindScheduled
Query frequency1h
Query period7d
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Microsoft Business Applications/Analytic Rules/Power Automate - Departing employee flow activity.yaml
Version3.2.0
Arm templateb1e11b8c-545a-4dea-a912-0008e160d183.json
Deploy To Azure
let query_frequency = 1h;
PowerAutomateActivity
| where TimeGenerated >= ago(query_frequency)
| where EventOriginalType in ("CreateFlow", "EditFlow")
| join kind=inner (MSBizAppsTerminatedEmployees()) on $left.ActorName == $right.UserPrincipalName
| extend path = parse_url(FlowDetailsUrl).Path
| extend EnvironmentId = tostring(split(path, "/")[2])
| extend FlowId = tostring(split(path, "/")[-2])
| extend
    AccountName = tostring(split(ActorName, "@")[0]),
    UPNSuffix = tostring(split(ActorName, "@")[1]),
    PowerAutomateAppId = 27592,
    CloudAppId = 32780
| project
    TimeGenerated,
    EventOriginalType,
    ActorName,
    EnvironmentId,
    AccountName,
    UPNSuffix,
    PowerAutomateAppId,
    CloudAppId,
    FlowId
queryFrequency: 1h
tactics:
- Exfiltration
- Impact
version: 3.2.0
queryPeriod: 7d
alertDetailsOverride:
  alertDescriptionFormat: '{{ActorName}} is on the terminated employees watchlist and carried out {{EventOriginalType}} in environment id {{EnvironmentId}}.'
  alertDisplayNameFormat: PowerAutomate - Terminated user {{EventOriginalType}} detected
query: |
  let query_frequency = 1h;
  PowerAutomateActivity
  | where TimeGenerated >= ago(query_frequency)
  | where EventOriginalType in ("CreateFlow", "EditFlow")
  | join kind=inner (MSBizAppsTerminatedEmployees()) on $left.ActorName == $right.UserPrincipalName
  | extend path = parse_url(FlowDetailsUrl).Path
  | extend EnvironmentId = tostring(split(path, "/")[2])
  | extend FlowId = tostring(split(path, "/")[-2])
  | extend
      AccountName = tostring(split(ActorName, "@")[0]),
      UPNSuffix = tostring(split(ActorName, "@")[1]),
      PowerAutomateAppId = 27592,
      CloudAppId = 32780
  | project
      TimeGenerated,
      EventOriginalType,
      ActorName,
      EnvironmentId,
      AccountName,
      UPNSuffix,
      PowerAutomateAppId,
      CloudAppId,
      FlowId  
name: Power Automate - Departing employee flow activity
customDetails:
  FlowDetails: FlowId
  Environment: EnvironmentId
triggerOperator: gt
relevantTechniques:
- T1567
- T1485
- T1491
- T0813
- T0879
- T0826
kind: Scheduled
description: Identifies instances where an employee who has been notified or is already terminated, on the TerminatedEmployees watchlist, creates or modifies a Power Automate flow.
status: Available
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Microsoft Business Applications/Analytic Rules/Power Automate - Departing employee flow activity.yaml
id: b1e11b8c-545a-4dea-a912-0008e160d183
eventGroupingSettings:
  aggregationKind: SingleAlert
triggerThreshold: 0
requiredDataConnectors:
- connectorId: PowerAutomate
  dataTypes:
  - PowerAutomateActivity
severity: High
entityMappings:
- fieldMappings:
  - identifier: Name
    columnName: AccountName
  - identifier: UPNSuffix
    columnName: UPNSuffix
  entityType: Account
- fieldMappings:
  - identifier: AppId
    columnName: PowerAutomateAppId
  entityType: CloudApplication