Power Automate - Departing employee flow activity
| Id | b1e11b8c-545a-4dea-a912-0008e160d183 |
| Rulename | Power Automate - Departing employee flow activity |
| 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. |
| Severity | High |
| Tactics | Exfiltration Impact |
| Techniques | T1567 T1485 T1491 T0813 T0879 T0826 |
| Required data connectors | PowerAutomate |
| Kind | Scheduled |
| Query frequency | 1h |
| Query period | 7d |
| Trigger threshold | 0 |
| Trigger operator | gt |
| Source Uri | https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Microsoft Business Applications/Analytic Rules/Power Automate - Departing employee flow activity.yaml |
| Version | 3.2.0 |
| Arm template | b1e11b8c-545a-4dea-a912-0008e160d183.json |
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