azure-la-attach-user-mi

Attach a user-assigned managed identity to a Logic App (assign/action + workflows/write or sites/write).

derived azure emits CanAttachIdentity

match

A conjunctive graph pattern. Variables (?x) bind node ids; every clause must hold.

{'principal': None} CanPassIdentity {'userMI': None}

where

?principal has EFFECTIVE Microsoft.ManagedIdentity/userAssignedIdentities/assign/action on ?userMI ?principal has EFFECTIVE Microsoft.Logic/workflows/write (Consumption) OR Microsoft.Web/sites/write (Standard) on the target workflow

emit

source typeIdentity
target typeCompute
source<principal>
target<Logic App workflow (existing or new)>
permissionsMicrosoft.ManagedIdentity/userAssignedIdentities/assign/action Microsoft.Logic/workflows/write
conditionsrole_compatibility
state logicACTIVE when BOTH permissions are confirmed at their respective scopes and role_compatible(?userMI, ?workflow) holds. POTENTIAL(role_compatibility) when the assign/action scope excludes the target MI. BLOCKED if a deny assignment covers either action.

Narrative

{principal.name} can attach user-assigned managed identity {userMI.name} to Logic App {target.name} (assign/action + workflows/write), binding a higher-privilege identity to the workflow.

Raw rule rules/derived/azure/logicapps.yaml

id: azure-la-attach-user-mi
emits: CanAttachIdentity
description: Attach a user-assigned managed identity to a Logic App (assign/action + workflows/write or
  sites/write).
match:
- - principal: null
  - CanPassIdentity
  - userMI: null
where:
- ?principal has EFFECTIVE Microsoft.ManagedIdentity/userAssignedIdentities/assign/action on ?userMI
- ?principal has EFFECTIVE Microsoft.Logic/workflows/write (Consumption) OR Microsoft.Web/sites/write
  (Standard) on the target workflow
emit:
  source_type: Identity
  target_type: Compute
  source: <principal>
  target: <Logic App workflow (existing or new)>
  permissions:
  - Microsoft.ManagedIdentity/userAssignedIdentities/assign/action
  - Microsoft.Logic/workflows/write
  conditions:
  - role_compatibility
  state_logic: ACTIVE when BOTH permissions are confirmed at their respective scopes and role_compatible(?userMI,
    ?workflow) holds. POTENTIAL(role_compatibility) when the assign/action scope excludes the target MI.
    BLOCKED if a deny assignment covers either action.
  confidence: 0.95
  derived_from:
  - '<CanPassIdentity edge: ?principal -> ?userMI>'
  false_positive_note: "BOTH permissions are required: assign/action on the specific user-assigned MI\
    \ AND workflows/write (Consumption) or sites/write (Standard) on the target workflow. Neither alone\
    \ attaches the MI. Honor the assign/action resource scope \u2014 a scope limited to a different MI\
    \ does not qualify. System-assigned MI is enabled via workflows/write alone but yields only a freshly-created\
    \ SP with no RBAC grants \u2014 no immediate privilege gain."
  narrative: '{principal.name} can attach user-assigned managed identity {userMI.name} to Logic App {target.name}
    (assign/action + workflows/write), binding a higher-privilege identity to the workflow.'
move · open · esc close