Power Automate Governance

Power Automate Governance

Guides the AI to govern Power Automate flows and Power Apps at scale through an MCP store: classify by impact, find orphans, audit connectors and score compliance.

Skill files1 file
SKILL.md359 lines
1
---
2
name: flowstudio-power-automate-governance
3
description: >-
4
Govern Power Automate flows and Power Apps at scale using the FlowStudio MCP
5
cached store. Classify flows by business impact, detect orphaned resources,
6
audit connector usage, enforce compliance standards, manage notification rules,
7
and compute governance scores — all without Dataverse or the CoE Starter Kit.
8
Load this skill when asked to: tag or classify flows, set business impact,
9
assign ownership, detect orphans, audit connectors, check compliance, compute
10
archive scores, manage notification rules, run a governance review, generate
11
a compliance report, offboard a maker, or any task that involves writing
12
governance metadata to flows. Requires an MCP Pro+
13
subscription — see https://mcp.flowstudio.app
14
---
15
16
# Power Automate Governance with FlowStudio MCP
17
18
Classify, tag, and govern Power Automate flows at scale through the FlowStudio
19
MCP **cached store** — without Dataverse, without the CoE Starter Kit, and
20
without the Power Automate portal.
21
22
This skill uses the same `store_*` tool family as `flowstudio-power-automate-monitoring`,
23
but with a different *intent*: governance writes metadata (`update_store_flow`)
24
and reads for *audit and classification* outcomes. Monitoring reads the same
25
tools for *operational health* outcomes. Don't try to memorize which skill
26
"owns" which tool — pick by what the user is doing. For health checks and
27
failure-rate dashboards, load `flowstudio-power-automate-monitoring` instead.
28
29
> **⚠️ Pro+ subscription required.** This skill calls `store_*` tools that
30
> only work for MCP Pro+ subscribers, and not in Microsoft 365 Copilot (Copilot Chat or Cowork),
31
> even on Pro+.
32
>
33
> **If the store tools are missing or refused:** `tool_search` with
34
> `query: "skill:governance"` returns no tools, or a `store_*` tool call returns
35
> the error "This tool requires a Flow Studio MCP Pro+ plan" (in Microsoft 365
36
> Copilot it says the store isn't available over single sign-on). When that happens:
37
> 1. STOP calling store tools
38
> 2. If it mentions single sign-on, or you are in Microsoft 365 Copilot: tell the
39
> user store tools don't work there on any plan; with Pro+ they work from an
40
> agent connected with an API key or the `https://mcp.flowstudio.app/mcp/oauth` sign-in
41
> 3. Otherwise, tell the user governance features require a Pro+ subscription
42
> and link them to https://mcp.flowstudio.app/pricing
43
>
44
> **Discovery:** load tool schemas via the meta-tools rather than `tools/list` —
45
> `query: "skill:governance"` loads `list_store_flows`, `get_store_flow`,
46
> `update_store_flow`, `list_store_makers` and `get_store_maker`. Load the rest
47
> by name: `query: "select:list_store_power_apps,list_store_environments,list_store_connections"`.
48
> This skill covers workflow patterns and field semantics — things `tool_search`
49
> cannot tell you. If this document disagrees with a real API response, the API wins.
50
51
---
52
53
## Critical: How to Extract Flow IDs
54
55
`list_store_flows` returns `id` in format `<environmentId>.<flowId>`. **You must split
56
on the first `.`** to get `environmentName` and `flowName` for all other tools:
57
58
```
59
id = "Default-<envGuid>.<flowGuid>"
60
environmentName = "Default-<envGuid>" (everything before first ".")
61
flowName = "<flowGuid>" (everything after first ".")
62
```
63
64
Also: skip entries that have no `displayName` or have `state=Deleted` —
65
these are sparse records or flows that no longer exist in Power Automate.
66
If a deleted flow has `monitor=true`, suggest disabling monitoring
67
(`update_store_flow` with `monitor=false`) to free up a monitoring slot
68
(Pro+ includes 20).
69
70
---
71
72
## The Write Tool: `update_store_flow`
73
74
`update_store_flow` writes governance metadata to the **FlowStudio cache
75
only** — it does NOT modify the flow in Power Automate. These fields are
76
not visible via `get_live_flow` or the PA portal. They exist only in the
77
FlowStudio store and are used by FlowStudio's scanning pipeline and
78
notification rules.
79
80
This means:
81
- `ownerTeam` / `supportEmail` — sets who FlowStudio considers the
82
governance contact. Does NOT change the actual PA flow owner.
83
- `rule_notify_email` — sets who receives FlowStudio failure/missing-run
84
notifications. Does NOT change Microsoft's built-in flow failure alerts.
85
- `monitor` / `critical` / `businessImpact` — FlowStudio classification
86
only. Power Automate has no equivalent fields.
87
88
Merge semantics — only fields you provide are updated. Returns the full
89
updated record (same shape as `get_store_flow`).
90
91
Required parameters: `environmentName`, `flowName`. All other fields optional.
92
93
### Settable Fields
94
95
| Field | Type | Purpose |
96
|---|---|---|
97
| `monitor` | bool | Enable run-level scanning (Pro+: 20 flows included) |
98
| `rule_notify_onfail` | bool | Send email notification on any failed run |
99
| `rule_notify_onmissingdays` | number | Send notification when flow hasn't run in N days (0 = disabled) |
100
| `rule_notify_email` | string | Comma-separated notification recipients |
101
| `description` | string | What the flow does |
102
| `tags` | string | Classification tags (also auto-extracted from description `#hashtags`) |
103
| `businessImpact` | string | Low / Medium / High / Critical |
104
| `businessJustification` | string | Why the flow exists, what process it automates |
105
| `businessValue` | string | Business value statement |
106
| `ownerTeam` | string | Accountable team |
107
| `ownerBusinessUnit` | string | Business unit |
108
| `supportGroup` | string | Support escalation group |
109
| `supportEmail` | string | Support contact email |
110
| `critical` | bool | Designate as business-critical |
111
| `tier` | string | Standard or Premium |
112
| `security` | string | Security classification or notes |
113
114
> **Caution with `security`:** The `security` field on `get_store_flow`
115
> contains structured JSON (e.g. `{"triggerRequestAuthenticationType":"All"}`).
116
> Writing a plain string like `"reviewed"` will overwrite this. To mark a
117
> flow as security-reviewed, use `tags` instead.
118
119
---
120
121
## Governance Workflows
122
123
### 1. Compliance Detail Review
124
125
Identify flows missing required governance metadata.
126
127
```
128
1. Ask the user which compliance fields they require
129
2. list_store_flows
130
3. For each active flow: split id, call get_store_flow, check required fields
131
4. Report non-compliant flows with missing fields listed
132
5. For updates: ask for values, then update_store_flow(...provided fields)
133
```
134
135
Common compliance fields: `description`, `businessImpact`,
136
`businessJustification`, `ownerTeam`, `supportEmail`, `monitor`,
137
`rule_notify_onfail`, `critical`. Ask for the user's policy before flagging.
138
139
### 2. Orphaned Resource Detection
140
141
Find flows owned by deleted or disabled Azure AD accounts.
142
143
```
144
1. list_store_makers
145
2. Filter where deleted=true AND ownerFlowCount > 0
146
3. list_store_flows → collect all flows
147
4. For each active flow: split id, get_store_flow, parse owners JSON
148
5. Match owner principalId against orphaned maker id
149
6. Reassign governance contact or stop/tag for decommission
150
```
151
152
`update_store_flow` does not transfer actual PA ownership; use the admin center
153
or PowerShell for that. Some orphaned-looking flows are system-generated; tag
154
them instead of reassigning when appropriate. Store coverage is only as fresh as
155
the latest scan.
156
157
### 3. Archive Score Calculation
158
159
Compute an inactivity score (0-7) per flow to identify cleanup candidates.
160
161
```
162
1. list_store_flows
163
2. For each active flow: split id, get_store_flow
164
3. Add 1 point each: created≈modified, test/demo/temp/copy name, age >12mo,
165
stopped/suspended, no owners, no recent runs, complexity.actions < 5
166
4. Score 5-7: recommend archive; 3-4: tag #archive-review; 0-2: active
167
5. For confirmed archive: set_live_flow_state(..., "Stopped") and append #archived
168
```
169
170
Archive via MCP means stop the flow and tag it. `delete_live_flow` can delete,
171
but it is refused while the person's Delete Lock is on (the default; only they
172
can turn it off, on the dashboard). Stopping and tagging can be undone.
173
174
### 4. Connector Audit
175
176
Audit which connectors are in use across monitored flows. Useful for DLP
177
impact analysis and premium license planning.
178
179
```
180
1. list_store_flows(monitor=true)
181
2. For each active flow: split id, get_store_flow, parse connections JSON
182
3. Group by apiName; flag Premium tier, HTTP connectors, custom connectors
183
4. Report inventory to user
184
```
185
186
Scope to monitored flows where possible; each `get_store_flow` call costs time.
187
`list_store_connections` lists connection instances, not connector usage per
188
flow. DLP policies are not exposed; ask the user for connector classifications.
189
190
### 5. Notification Rule Management
191
192
Configure monitoring and alerting for flows at scale.
193
194
```
195
Enable failure alerts on all critical flows:
196
1. list_store_flows(monitor=true)
197
2. For each active flow: split id, get_store_flow
198
3. If critical=true and rule_notify_onfail is false, update_store_flow(...,
199
rule_notify_onfail=true, rule_notify_email="oncall@contoso.com")
200
201
Enable missing-run detection for scheduled flows:
202
1. list_store_flows(monitor=true)
203
2. For active Recurrence flows: get_store_flow
204
3. If rule_notify_onmissingdays is 0/missing, update_store_flow(...,
205
rule_notify_onmissingdays=2)
206
```
207
208
Check monitoring limits before bulk-enabling `monitor=true`. If no flows have
209
`critical=true`, report that as a governance gap before configuring alerts.
210
211
### 6. Classification and Tagging
212
213
Bulk-classify flows by connector type, business function, or risk level.
214
215
```
216
Auto-tag by connector:
217
1. list_store_flows
218
2. For each active flow: split id, get_store_flow, parse connections JSON
219
3. Map apiName values to tags (#sharepoint, #teams, #email, #custom-connector)
220
4. Read existing store tags, append new tags, update_store_flow(tags=...)
221
```
222
223
Store tags and description hashtags are separate systems. `tags=` overwrites
224
store tags, so read/append/write. Avoid overriding computed `tier` unless asked.
225
226
### 7. Maker Offboarding
227
228
When an employee leaves, identify their flows and apps, and reassign
229
FlowStudio governance contacts and notification recipients.
230
231
```
232
1. get_store_maker(makerKey="<departing-user-aad-oid>")
233
→ check ownerFlowCount, ownerAppCount, deleted status
234
2. list_store_flows → collect all flows
235
3. For each active flow: split id, get_store_flow, parse owners JSON
236
4. Flag flows whose owner principalId matches the departing user's OID
237
5. list_store_power_apps → filter ownerId
238
6. For kept flows: update ownerTeam/supportEmail/rule_notify_email; consider
239
add_to_solution(flowName, solution) before account deletion
240
7. For retired flows: set_live_flow_state(..., "Stopped") and tag #decommissioned
241
8. Report: flows reassigned, flows migrated to solutions, flows stopped,
242
apps needing manual reassignment
243
```
244
245
This changes FlowStudio governance contacts, not actual PA ownership. Power
246
Apps ownership changes are manual/admin-center work.
247
248
### 8. Security Review
249
250
Review flows for potential security concerns using cached store data.
251
252
```
253
1. list_store_flows(monitor=true)
254
2. For each active flow: split id, get_store_flow
255
3. Parse security/connections/referencedResources JSON; read sharingType top-level
256
4. Report findings; for reviewed flows append #security-reviewed tag
257
```
258
259
Security signals: `security.triggerRequestAuthenticationType`, `sharingType`,
260
`connections`, `referencedResources`, `tier`. Never overwrite the structured
261
`security` field; tag reviewed flows instead.
262
263
### 9. Environment Governance
264
265
Audit environments for compliance and sprawl.
266
267
```
268
1. list_store_environments
269
Skip entries without displayName (tenant-level metadata rows)
270
2. Flag:
271
- Developer environments
272
- Non-managed environments
273
- Environments where service account lacks admin access (isAdmin=false)
274
3. list_store_flows → group by environmentName
275
4. list_store_connections → group by environmentName
276
```
277
278
### 10. Governance Dashboard
279
280
Generate a tenant-wide governance summary.
281
282
```
283
Efficient metrics (list calls only):
284
1. total_flows = len(list_store_flows())
285
2. monitored = len(list_store_flows(monitor=true))
286
3. with_onfail = len(list_store_flows(rule_notify_onfail=true))
287
4. makers/apps/envs/conns = list_store_makers/list_store_power_apps/list_store_environments/list_store_connections
288
5. Compute monitoring %, notification %, orphan count, high-failure count
289
290
Detailed metrics (require get_store_flow per flow — expensive for large tenants):
291
- Compliance %: flows with businessImpact set / total active flows
292
- Undocumented count: flows without description
293
- Tier breakdown: group by tier field
294
```
295
296
### 11. Change Audit
297
298
See what changed in a flow and when. These are live tools (`flow-versions`
299
bundle), not store tools.
300
301
```
302
1. get_live_flow_versions(environmentName, flowName)
303
→ versions, newest first: version, source, current, savedAt; a flow in a
304
solution adds by and operation, any other flow firstRan, lastRan, runCount
305
2. diff_live_flow(from=<older version or a date>) — to defaults to the current flow
306
→ actions added, removed and changed, with field-level before/after
307
3. Report the changes; tag reviewed flows #change-reviewed
308
```
309
310
A flow in a solution lists every published version; any other flow lists only
311
versions that ran, while their runs are kept. A version with `source: "draft"`
312
is an unpublished portal draft, and it blocks saves until published or discarded.
313
314
---
315
316
## Field Reference: `get_store_flow` Fields Used in Governance
317
318
All fields below are confirmed present on the `get_store_flow` response.
319
Fields marked with `*` are also available on `list_store_flows` (cheaper).
320
321
| Field | Type | Governance use |
322
|---|---|---|
323
| `displayName` * | string | Archive score (test/demo name detection) |
324
| `state` * | string | Archive score, lifecycle management |
325
| `tier` | string | License audit (Standard vs Premium) |
326
| `monitor` * | bool | Is this flow being actively monitored? |
327
| `critical` | bool | Business-critical designation (settable via update_store_flow) |
328
| `businessImpact` | string | Compliance classification |
329
| `businessJustification` | string | Compliance attestation |
330
| `ownerTeam` | string | Ownership accountability |
331
| `supportEmail` | string | Escalation contact |
332
| `rule_notify_onfail` | bool | Failure alerting configured? |
333
| `rule_notify_onmissingdays` | number | SLA monitoring configured? |
334
| `rule_notify_email` | string | Alert recipients |
335
| `description` | string | Documentation completeness |
336
| `tags` | string | Classification — `list_store_flows` shows description-extracted hashtags only; store tags written by `update_store_flow` require `get_store_flow` to read back |
337
| `runPeriodTotal` * | number | Activity level |
338
| `runPeriodFailRate` * | number | Health status |
339
| `runLast` | ISO string | Last run timestamp |
340
| `scanned` | ISO string | Data freshness |
341
| `deleted` | bool | Lifecycle tracking |
342
| `createdTime` * | ISO string | Archive score (age) |
343
| `lastModifiedTime` * | ISO string | Archive score (staleness) |
344
| `owners` | JSON string | Orphan detection, ownership audit — parse with json.loads() |
345
| `connections` | JSON string | Connector audit, tier — parse with json.loads() |
346
| `complexity` | JSON string | Archive score (simplicity) — parse with json.loads() |
347
| `security` | JSON string | Auth type audit — parse with json.loads(), contains `triggerRequestAuthenticationType` |
348
| `sharingType` | string | Oversharing detection (top-level, NOT inside security) |
349
| `referencedResources` | JSON string | URL audit — parse with json.loads() |
350
351
---
352
353
## Related Skills
354
355
- `flowstudio-power-automate-monitoring` — Health checks, failure rates, inventory (read-only)
356
- `flowstudio-power-automate-mcp` — Foundation skill: connection setup, MCP helper, tool discovery
357
- `flowstudio-power-automate-debug` — Deep diagnosis with action-level inputs/outputs
358
- `flowstudio-power-automate-build` — Build and deploy flow definitions
359

© GitHub, Inc. · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 14,621 prompts

More by @OpenSourceBuffGuy

See all
Sea turtle carrying floating film studio island prompt image

Sea turtle carrying floating film studio island

Draws a giant sea turtle carrying a floating island film studio through a starry sky, where fairies polish rough film strips into golden film.

image-prompt, nano-banana, 3d-render, cartoon, fantasy-world, creatures, animals, whimsical, dreamy, cinematic, dramatic-lighting, vibrant-colors, bokeh, miniature, widescreen, night-scene, illustration, concept-art, surreal, storytelling, clay-3d

Desert buggy escapes drones past industrial outpost prompt image

Desert buggy escapes drones past industrial outpost

Builds a 15-second desert chase video where a racer in an armored buggy escapes drones past an industrial outpost, using five reference images with set jobs.

video-prompt, hailuo, action, multi-shot, timed-beats, camera-movement, reference-image, character-consistency, negative-prompt, cinematic, sci-fi, cars, landscape, aerial-view, tracking-shot, photorealistic, sound-effects, structured-output, long-form, widescreen

1 view
Cozy Pixel Art Farm Island Village prompt image

Cozy Pixel Art Farm Island Village

Draws a cozy 16-bit pixel-art farming village across six small islands joined by bridges, with exact counts for buildings, animals and crops.

image-prompt, gpt-image, pixel-art, isometric, game-assets, concept-art, maps, worldbuilding, cozy, vibrant-colors, ocean, landscape, wide-shot, widescreen, game-development, video-games, structured-output, whimsical, summer, high-angle, aerial-view, animals, negative-prompt, cityscape

1 view

Reviews

Loading reviews…

Discussion

Loading comments…