flowstudio-power-automate-governance
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePower Automate Governance with FlowStudio MCP
基于FlowStudio MCP的Power Automate治理
Classify, tag, and govern Power Automate flows at scale through the FlowStudio
MCP cached store — without Dataverse, without the CoE Starter Kit, and
without the Power Automate portal.
This skill uses to write governance metadata and the
monitoring tools (, , ,
etc.) to read tenant state. For monitoring and health-check workflows, see
the skill.
update_store_flowlist_store_flowsget_store_flowlist_store_makersflowstudio-power-automate-monitoringStart every session withto confirm tool names and parameters. This skill covers workflows and patterns — thingstools/listcannot tell you. If this document disagrees withtools/listor a real API response, the API wins.tools/list
通过FlowStudio MCP 缓存存储,你可以大规模对Power Automate流进行分类、打标签和治理——无需Dataverse、无需CoE Starter Kit、也无需访问Power Automate门户。
本技能使用写入治理元数据,使用监控工具(、、等)读取租户状态。如果你需要监控和健康检查工作流,请参考技能。
update_store_flowlist_store_flowsget_store_flowlist_store_makersflowstudio-power-automate-monitoring每个会话都请先执行确认工具名称和参数。本技能覆盖了tools/list无法提供的工作流和最佳实践,如果本文档与tools/list或实际API返回结果冲突,请以API为准。tools/list
Critical: How to Extract Flow IDs
关键说明:如何提取流ID
list_store_flowsid<environmentId>.<flowId>.environmentNameflowNameid = "Default-<envGuid>.<flowGuid>"
environmentName = "Default-<envGuid>" (everything before first ".")
flowName = "<flowGuid>" (everything after first ".")Also: skip entries that have no or have —
these are sparse records or flows that no longer exist in Power Automate.
If a deleted flow has , suggest disabling monitoring
( with ) to free up a monitoring slot
(standard plan includes 20).
displayNamestate=Deletedmonitor=trueupdate_store_flowmonitor=falselist_store_flowsid<environmentId>.<flowId>.environmentNameflowNameid = "Default-<envGuid>.<flowGuid>"
environmentName = "Default-<envGuid>" (第一个「.」之前的所有内容)
flowName = "<flowGuid>" (第一个「.」之后的所有内容)另外:请跳过没有或的条目——这些是稀疏记录或已经在Power Automate中删除的流。如果已删除的流,建议关闭监控(调用设置)以释放监控配额(标准版方案包含20个监控名额)。
displayNamestate=Deletedmonitor=trueupdate_store_flowmonitor=falseThe Write Tool: update_store_flow
update_store_flow写入工具:update_store_flow
update_store_flowupdate_store_flowget_live_flowThis means:
- /
ownerTeam— sets who Flow Studio considers the governance contact. Does NOT change the actual PA flow owner.supportEmail - — sets who receives Flow Studio failure/missing-run notifications. Does NOT change Microsoft's built-in flow failure alerts.
rule_notify_email - /
monitor/critical— Flow Studio classification only. Power Automate has no equivalent fields.businessImpact
Merge semantics — only fields you provide are updated. Returns the full
updated record (same shape as ).
get_store_flowRequired parameters: , . All other fields optional.
environmentNameflowNameupdate_store_flowget_live_flow这意味着:
- /
ownerTeam— 仅设置Flow Studio识别的治理联系人,不会修改PA流的实际所有者。supportEmail - — 仅设置接收Flow Studio故障/缺失运行通知的对象,不会修改微软内置的流故障告警。
rule_notify_email - /
monitor/critical— 仅为Flow Studio的分类字段,Power Automate没有对应字段。businessImpact
合并语义:仅更新你传入的字段,返回完整的更新后记录(格式与一致)。
get_store_flow必填参数:、,其余所有字段为选填。
environmentNameflowNameSettable Fields
可设置字段
| Field | Type | Purpose |
|---|---|---|
| bool | Enable run-level scanning (standard plan: 20 flows included) |
| bool | Send email notification on any failed run |
| number | Send notification when flow hasn't run in N days (0 = disabled) |
| string | Comma-separated notification recipients |
| string | What the flow does |
| string | Classification tags (also auto-extracted from description |
| string | Low / Medium / High / Critical |
| string | Why the flow exists, what process it automates |
| string | Business value statement |
| string | Accountable team |
| string | Business unit |
| string | Support escalation group |
| string | Support contact email |
| bool | Designate as business-critical |
| string | Standard or Premium |
| string | Security classification or notes |
Caution with: Thesecurityfield onsecuritycontains structured JSON (e.g.get_store_flow). Writing a plain string like{"triggerRequestAuthenticationType":"All"}will overwrite this. To mark a flow as security-reviewed, use"reviewed"instead.tags
| 字段 | 类型 | 用途 |
|---|---|---|
| 布尔值 | 启用运行级扫描(标准版方案包含20个流的配额) |
| 布尔值 | 任何运行失败时发送邮件通知 |
| 数字 | 当流N天未运行时发送通知(0=关闭该功能) |
| 字符串 | 逗号分隔的通知接收人列表 |
| 字符串 | 流的功能说明 |
| 字符串 | 分类标签(也会从description的 |
| 字符串 | 低/中/高/关键 |
| 字符串 | 流存在的原因、自动化的业务流程 |
| 字符串 | 业务价值说明 |
| 字符串 | 负责团队 |
| 字符串 | 所属业务单元 |
| 字符串 | 支持升级组 |
| 字符串 | 支持联系人邮箱 |
| 布尔值 | 标记为业务关键流 |
| 字符串 | 标准版或高级版 |
| 字符串 | 安全分类或备注 |
字段注意事项:security返回的get_store_flow字段为结构化JSON(例如security),如果写入{"triggerRequestAuthenticationType":"All"}这类普通字符串会覆盖原有结构。如果要标记流已完成安全评审,请使用"reviewed"字段。tags
Governance Workflows
治理工作流
1. Compliance Detail Review
1. 合规详情评审
Identify flows missing required governance metadata — the equivalent of
the CoE Starter Kit's Developer Compliance Center.
1. Ask the user which compliance fields they require
(or use their organization's existing governance policy)
2. list_store_flows
3. For each flow (skip entries without displayName or state=Deleted):
- Split id → environmentName, flowName
- get_store_flow(environmentName, flowName)
- Check which required fields are missing or empty
4. Report non-compliant flows with missing fields listed
5. For each non-compliant flow:
- Ask the user for values
- update_store_flow(environmentName, flowName, ...provided fields)Fields available for compliance checks:
| Field | Example policy |
|---|---|
| Every flow should be documented |
| Classify as Low / Medium / High / Critical |
| Required for High/Critical impact flows |
| Every flow should have an accountable team |
| Required for production flows |
| Required for critical flows (note: standard plan includes 20 monitored flows) |
| Recommended for monitored flows |
| Designate business-critical flows |
Each organization defines their own compliance rules. The fields above are suggestions based on common Power Platform governance patterns (CoE Starter Kit). Ask the user what their requirements are before flagging flows as non-compliant.Tip: Flows created or updated via MCP already have(auto-appended bydescription). Flows created manually in the Power Automate portal are the ones most likely missing governance metadata.update_live_flow
识别缺失必填治理元数据的流,功能等同于CoE Starter Kit的开发者合规中心。
1. 询问用户需要哪些合规字段(或使用其组织现有治理政策)
2. 调用list_store_flows
3. 遍历每个流(跳过无displayName或state=Deleted的条目):
- 分割id得到environmentName、flowName
- 调用get_store_flow(environmentName, flowName)
- 检查哪些必填字段缺失或为空
4. 输出不合规流列表及缺失的字段
5. 针对每个不合规流:
- 询问用户对应字段值
- 调用update_store_flow(environmentName, flowName, ...用户提供的字段)可用于合规检查的字段:
| 字段 | 示例政策 |
|---|---|
| 所有流都需要填写文档说明 |
| 必须分类为低/中/高/关键 |
| 高/关键影响的流必须填写 |
| 所有流必须绑定负责团队 |
| 生产环境流必须填写 |
| 关键流必须开启监控(注意:标准版方案包含20个监控流配额) |
| 建议监控流开启该功能 |
| 标记业务关键流 |
每个组织的合规规则自行定义,以上字段是基于通用Power Platform治理模式(CoE Starter Kit)的建议。在标记流为不合规前,请先确认用户的具体要求。提示: 通过MCP创建或更新的流已经自动通过添加了update_live_flow,在Power Automate门户手动创建的流最容易缺失治理元数据。description
2. Orphaned Resource Detection
2. 孤儿资源检测
Find flows owned by deleted or disabled Azure AD accounts.
1. list_store_makers
2. Filter where deleted=true AND ownerFlowCount > 0
Note: deleted makers have NO displayName/mail — record their id (AAD OID)
3. list_store_flows → collect all flows
4. For each flow (skip entries without displayName or state=Deleted):
- Split id → environmentName, flowName
- get_store_flow(environmentName, flowName)
- Parse owners: json.loads(record["owners"])
- Check if any owner principalId matches an orphaned maker id
5. Report orphaned flows: maker id, flow name, flow state
6. For each orphaned flow:
- Reassign governance: update_store_flow(environmentName, flowName,
ownerTeam="NewTeam", supportEmail="new-owner@contoso.com")
- Or decommission: set_store_flow_state(environmentName, flowName,
state="Stopped")updates governance metadata in the cache only. To transfer actual PA ownership, an admin must use the Power Platform admin center or PowerShell.update_store_flowNote: Many orphaned flows are system-generated (created byaccounts for SLA monitoring, knowledge articles, etc.). These were never built by a person — consider tagging them rather than reassigning.DataverseSystemUserCoverage: This workflow searches the cached store only, not the live PA API. Flows created after the last scan won't appear.
查找归属于已删除或禁用Azure AD账号的流。
1. 调用list_store_makers
2. 筛选deleted=true且ownerFlowCount > 0的条目
注意:已删除的开发者没有displayName/mail,记录其id(AAD OID)即可
3. 调用list_store_flows收集所有流
4. 遍历每个流(跳过无displayName或state=Deleted的条目):
- 分割id得到environmentName、flowName
- 调用get_store_flow(environmentName, flowName)
- 解析所有者:json.loads(record["owners"])
- 检查是否有所有者的principalId匹配孤儿开发者的id
5. 输出孤儿流列表:开发者id、流名称、流状态
6. 针对每个孤儿流:
- 重新分配治理权限:调用update_store_flow(environmentName, flowName,
ownerTeam="新团队", supportEmail="new-owner@contoso.com")
- 或下线:调用set_store_flow_state(environmentName, flowName,
state="Stopped")仅更新缓存中的治理元数据,要转移PA流的实际所有权,管理员需要使用Power Platform管理中心或PowerShell操作。update_store_flow注意: 很多孤儿流是系统生成的(由账号创建,用于SLA监控、知识文章等场景),这类流并非人工构建,建议优先打标记而非重新分配。DataverseSystemUser覆盖范围: 本工作流仅搜索缓存存储,不查询PA实时API,上次扫描后创建的流不会出现在结果中。
3. Archive Score Calculation
3. 归档评分计算
Compute an inactivity score (0-7) per flow to identify safe cleanup
candidates. Aligns with the CoE Starter Kit's archive scoring.
1. list_store_flows
2. For each flow (skip entries without displayName or state=Deleted):
- Split id → environmentName, flowName
- get_store_flow(environmentName, flowName)
3. Compute archive score (0-7), add 1 point for each:
+1 lastModifiedTime within 24 hours of createdTime
+1 displayName contains "test", "demo", "copy", "temp", or "backup"
(case-insensitive)
+1 createdTime is more than 12 months ago
+1 state is "Stopped" or "Suspended"
+1 json.loads(owners) is empty array []
+1 runPeriodTotal = 0 (never ran or no recent runs)
+1 parse json.loads(complexity) → actions < 5
4. Classify:
Score 5-7: Recommend archive — report to user for confirmation
Score 3-4: Flag for review →
Read existing tags from get_store_flow response, append #archive-review
update_store_flow(environmentName, flowName, tags="<existing> #archive-review")
Score 0-2: Active, no action
5. For user-confirmed archives:
set_store_flow_state(environmentName, flowName, state="Stopped")
Read existing tags, append #archived
update_store_flow(environmentName, flowName, tags="<existing> #archived")What "archive" means: Power Automate has no native archive feature. Archiving via MCP means: (1) stop the flow so it can't run, and (2) tag itso it's discoverable for future cleanup. Actual deletion requires the Power Automate portal or admin PowerShell — it cannot be done via MCP tools.#archived
为每个流计算0-7的不活跃度评分,识别可安全清理的候选流,对齐CoE Starter Kit的归档评分逻辑。
1. 调用list_store_flows
2. 遍历每个流(跳过无displayName或state=Deleted的条目):
- 分割id得到environmentName、flowName
- 调用get_store_flow(environmentName, flowName)
3. 计算归档评分(0-7),满足以下条件每项加1分:
+1 lastModifiedTime与createdTime相差不超过24小时
+1 displayName包含「test」、「demo」、「copy」、「temp」或「backup」(不区分大小写)
+1 createdTime距今超过12个月
+1 state为「Stopped」或「Suspended」
+1 json.loads(owners)为空数组[]
+1 runPeriodTotal = 0(从未运行或近期无运行记录)
+1 解析json.loads(complexity) → actions < 5
4. 分类处理:
评分5-7:建议归档,提交用户确认
评分3-4:标记待评审 →
从get_store_flow返回结果读取现有标签,追加#archive-review
调用update_store_flow(environmentName, flowName, tags="<现有标签> #archive-review")
评分0-2:活跃流,无需操作
5. 针对用户确认归档的流:
调用set_store_flow_state(environmentName, flowName, state="Stopped")
读取现有标签,追加#archived
调用update_store_flow(environmentName, flowName, tags="<现有标签> #archived")「归档」的定义: Power Automate没有原生归档功能,通过MCP归档指:(1) 停止流运行,(2) 打标签便于后续清理。实际删除需要通过Power Automate门户或管理员PowerShell操作,无法通过MCP工具完成。#archived
4. Connector Audit
4. 连接器审计
Audit which connectors are in use across monitored flows. Useful for DLP
impact analysis and premium license planning.
1. list_store_flows(monitor=true)
(scope to monitored flows — auditing all 1000+ flows is expensive)
2. For each flow (skip entries without displayName or state=Deleted):
- Split id → environmentName, flowName
- get_store_flow(environmentName, flowName)
- Parse connections: json.loads(record["connections"])
Returns array of objects with apiName, apiId, connectionName
- Note the flow-level tier field ("Standard" or "Premium")
3. Build connector inventory:
- Which apiNames are used and by how many flows
- Which flows have tier="Premium" (premium connector detected)
- Which flows use HTTP connectors (apiName contains "http")
- Which flows use custom connectors (non-shared_ prefix apiNames)
4. Report inventory to user
- For DLP analysis: user provides their DLP policy connector groups,
agent cross-references against the inventoryScope to monitored flows. Each flow requires acall to read theget_store_flowJSON. Standard plans have ~20 monitored flows — manageable. Auditing all flows in a large tenant (1000+) would be very expensive in API calls.connectionsreturns connection instances (who created which connection) but NOT connector types per flow. Use it for connection counts per environment, not for the connector audit.list_store_connectionsDLP policy definitions are not available via MCP. The agent builds the connector inventory; the user provides the DLP classification to cross-reference against.
审计监控流中使用的连接器,可用于DLP影响分析和高级版许可规划。
1. 调用list_store_flows(monitor=true)
(限定监控流范围——审计1000+个全量流成本很高)
2. 遍历每个流(跳过无displayName或state=Deleted的条目):
- 分割id得到environmentName、flowName
- 调用get_store_flow(environmentName, flowName)
- 解析连接:json.loads(record["connections"])
返回包含apiName、apiId、connectionName的对象数组
- 记录流层级的tier字段(「Standard」或「Premium」)
3. 构建连接器清单:
- 用到的apiName列表及对应流数量
- tier="Premium"的流列表(检测到高级连接器)
- 使用HTTP连接器的流列表(apiName包含「http」)
- 使用自定义连接器的流列表(apiName没有shared_前缀)
4. 向用户输出清单
- 如需DLP分析:用户提供DLP政策连接器分组,agent与清单交叉比对即可限定为监控流范围。 每个流都需要调用读取get_store_flowJSON,标准版方案大约有20个监控流,可轻松处理。如果审计大型租户的全量流(1000+),API调用成本会非常高。connections返回连接实例(谁创建了哪个连接),但不返回每个流的连接器类型,可用于统计每个环境的连接数量,不适合用于连接器审计。list_store_connectionsDLP政策定义无法通过MCP获取,agent仅负责构建连接器清单,用户提供DLP分类后再做交叉比对。
5. Notification Rule Management
5. 通知规则管理
Configure monitoring and alerting for flows at scale.
Enable failure alerts on all critical flows:
1. list_store_flows(monitor=true)
2. For each flow (skip entries without displayName or state=Deleted):
- Split id → environmentName, flowName
- get_store_flow(environmentName, flowName)
- If critical=true AND rule_notify_onfail is not true:
update_store_flow(environmentName, flowName,
rule_notify_onfail=true,
rule_notify_email="oncall@contoso.com")
- If NO flows have critical=true: this is a governance finding.
Recommend the user designate their most important flows as critical
using update_store_flow(critical=true) before configuring alerts.
Enable missing-run detection for scheduled flows:
1. list_store_flows(monitor=true)
2. For each flow where triggerType="Recurrence" (available on list response):
- Skip flows with state="Stopped" or "Suspended" (not expected to run)
- Split id → environmentName, flowName
- get_store_flow(environmentName, flowName)
- If rule_notify_onmissingdays is 0 or not set:
update_store_flow(environmentName, flowName,
rule_notify_onmissingdays=2),critical, andrule_notify_onfailare only available fromrule_notify_onmissingdays, not fromget_store_flow. The list call pre-filters to monitored flows; the detail call checks the notification fields.list_store_flowsMonitoring limit: The standard plan (FlowStudio for Teams / MCP Pro+) includes 20 monitored flows. Before bulk-enabling, check how many flows are already monitored:monitor=truelen(list_store_flows(monitor=true))
大规模配置流的监控和告警规则。
为所有关键流开启故障告警:
1. 调用list_store_flows(monitor=true)
2. 遍历每个流(跳过无displayName或state=Deleted的条目):
- 分割id得到environmentName、flowName
- 调用get_store_flow(environmentName, flowName)
- 如果critical=true且rule_notify_onfail不为true:
调用update_store_flow(environmentName, flowName,
rule_notify_onfail=true,
rule_notify_email="oncall@contoso.com")
- 如果没有任何流的critical=true:属于治理发现项,建议用户先通过update_store_flow(critical=true)标记最重要的流,再配置告警。
为定时流开启运行缺失检测:
1. 调用list_store_flows(monitor=true)
2. 遍历所有triggerType="Recurrence"的流(列表返回中可获取该字段):
- 跳过state="Stopped"或「Suspended」的流(无运行预期)
- 分割id得到environmentName、flowName
- 调用get_store_flow(environmentName, flowName)
- 如果rule_notify_onmissingdays为0或未设置:
调用update_store_flow(environmentName, flowName,
rule_notify_onmissingdays=2)、critical和rule_notify_onfail仅可通过rule_notify_onmissingdays获取,get_store_flow不返回这些字段。列表调用先过滤监控流,详情调用再检查通知字段。list_store_flows监控配额限制: 标准版方案(FlowStudio for Teams / MCP Pro+)包含20个监控流配额,批量开启前,请先检查已监控的流数量:monitor=truelen(list_store_flows(monitor=true))
6. Classification and Tagging
6. 分类与打标签
Bulk-classify flows by connector type, business function, or risk level.
Auto-tag by connector:
1. list_store_flows
2. For each flow (skip entries without displayName or state=Deleted):
- Split id → environmentName, flowName
- get_store_flow(environmentName, flowName)
- Parse connections: json.loads(record["connections"])
- Build tags from apiName values:
shared_sharepointonline → #sharepoint
shared_teams → #teams
shared_office365 → #email
Custom connectors → #custom-connector
HTTP-related connectors → #http-external
- Read existing tags from get_store_flow response, append new tags
- update_store_flow(environmentName, flowName,
tags="<existing tags> #sharepoint #teams")Two tag systems: Tags shown inare auto-extracted from the flow'slist_store_flowsfield (e.g. a maker writesdescriptionin the PA portal description). Tags set via#operationswrite to a separate field in the Azure Table cache. They are independent — writing store tags does not touch the description, and editing the description in the portal does not affect store tags.update_store_flow(tags=...)Tag merge:overwrites the store tags field. To avoid losing tags from other workflows, read the current store tags fromupdate_store_flow(tags=...)first, append new ones, then write back.get_store_flowalready has aget_store_flowfield (Standard/Premium) computed by the scanning pipeline. Only usetierif you need to override it.update_store_flow(tier=...)
按连接器类型、业务功能或风险等级批量对流分类。
按连接器自动打标签:
1. 调用list_store_flows
2. 遍历每个流(跳过无displayName或state=Deleted的条目):
- 分割id得到environmentName、flowName
- 调用get_store_flow(environmentName, flowName)
- 解析连接:json.loads(record["connections"])
- 从apiName值生成标签:
shared_sharepointonline → #sharepoint
shared_teams → #teams
shared_office365 → #email
自定义连接器 → #custom-connector
HTTP相关连接器 → #http-external
- 从get_store_flow返回结果读取现有标签,追加新标签
- 调用update_store_flow(environmentName, flowName,
tags="<现有标签> #sharepoint #teams")两套标签系统:中展示的标签是从流的list_store_flows字段自动提取的(例如开发者在PA门户描述中写description)。通过#operations设置的标签写入Azure Table缓存的独立字段,两者相互独立:写入存储标签不会修改描述,在门户中编辑描述也不会影响存储标签。update_store_flow(tags=...)标签合并逻辑:会覆盖存储标签字段,为避免丢失其他工作流添加的标签,请先从update_store_flow(tags=...)读取当前存储标签,追加新标签后再写回。get_store_flow已包含扫描管道计算的get_store_flow字段(标准版/高级版),仅当需要覆盖该值时才调用tier。update_store_flow(tier=...)
7. Maker Offboarding
7. 开发者账号下架
When an employee leaves, identify their flows and apps, and reassign
Flow Studio governance contacts and notification recipients.
1. get_store_maker(makerKey="<departing-user-aad-oid>")
→ check ownerFlowCount, ownerAppCount, deleted status
2. list_store_flows → collect all flows
3. For each flow (skip entries without displayName or state=Deleted):
- Split id → environmentName, flowName
- get_store_flow(environmentName, flowName)
- Parse owners: json.loads(record["owners"])
- If any principalId matches the departing user's OID → flag
4. list_store_power_apps → filter where ownerId matches the OID
5. For each flagged flow:
- Check runPeriodTotal and runLast — is it still active?
- If keeping:
update_store_flow(environmentName, flowName,
ownerTeam="NewTeam", supportEmail="new-owner@contoso.com")
- If decommissioning:
set_store_flow_state(environmentName, flowName, state="Stopped")
Read existing tags, append #decommissioned
update_store_flow(environmentName, flowName, tags="<existing> #decommissioned")
6. Report: flows reassigned, flows stopped, apps needing manual reassignmentWhat "reassign" means here:changes who Flow Studio considers the governance contact and who receives Flow Studio notifications. It does NOT transfer the actual Power Automate flow ownership — that requires the Power Platform admin center or PowerShell. Also updateupdate_store_flowso failure notifications go to the new team instead of the departing employee's email.rule_notify_emailPower Apps ownership cannot be changed via MCP tools. Report them for manual reassignment in the Power Apps admin center.
当员工离职时,识别其创建的流和应用,重新分配Flow Studio治理联系人和通知接收人。
1. 调用get_store_maker(makerKey="<离职用户AAD OID>")
→ 检查ownerFlowCount、ownerAppCount、deleted状态
2. 调用list_store_flows收集所有流
3. 遍历每个流(跳过无displayName或state=Deleted的条目):
- 分割id得到environmentName、flowName
- 调用get_store_flow(environmentName, flowName)
- 解析所有者:json.loads(record["owners"])
- 如果任意principalId匹配离职用户的OID → 标记
4. 调用list_store_power_apps → 过滤ownerId匹配该OID的条目
5. 针对每个标记的流:
- 检查runPeriodTotal和runLast,确认是否仍在活跃运行
- 如果保留:
调用update_store_flow(environmentName, flowName,
ownerTeam="新团队", supportEmail="new-owner@contoso.com")
- 如果下线:
调用set_store_flow_state(environmentName, flowName, state="Stopped")
读取现有标签,追加#decommissioned
调用update_store_flow(environmentName, flowName, tags="<现有标签> #decommissioned")
6. 输出报告:已重新分配的流、已停止的流、需要手动重新分配的应用此处「重新分配」的定义:仅修改Flow Studio识别的治理联系人和Flow Studio通知接收人,不会转移Power Automate流的实际所有权——该操作需要通过Power Platform管理中心或PowerShell完成。同时请更新update_store_flow,确保故障通知发送到新团队而非离职员工邮箱。rule_notify_emailPower Apps所有权无法通过MCP工具修改,请输出清单,提示用户在Power Apps管理中心手动重新分配。
8. Security Review
8. 安全评审
Review flows for potential security concerns using cached store data.
1. list_store_flows(monitor=true)
2. For each flow (skip entries without displayName or state=Deleted):
- Split id → environmentName, flowName
- get_store_flow(environmentName, flowName)
- Parse security: json.loads(record["security"])
- Parse connections: json.loads(record["connections"])
- Read sharingType directly (top-level field, NOT inside security JSON)
3. Report findings to user for review
4. For reviewed flows:
Read existing tags, append #security-reviewed
update_store_flow(environmentName, flowName, tags="<existing> #security-reviewed")
Do NOT overwrite the security field — it contains structured auth dataFields available for security review:
| Field | Where | What it tells you |
|---|---|---|
| security JSON | |
| top-level | |
| connections JSON | Which connectors the flow uses (check for HTTP, custom) |
| JSON string | SharePoint sites, Teams channels, external URLs the flow accesses |
| top-level | |
Each organization decides what constitutes a security concern. For example, an unauthenticated HTTP trigger is expected for webhook receivers (Stripe, GitHub) but may be a risk for internal flows. Review findings in context before flagging.
使用缓存存储数据评审流的潜在安全风险。
1. 调用list_store_flows(monitor=true)
2. 遍历每个流(跳过无displayName或state=Deleted的条目):
- 分割id得到environmentName、flowName
- 调用get_store_flow(environmentName, flowName)
- 解析安全配置:json.loads(record["security"])
- 解析连接:json.loads(record["connections"])
- 直接读取顶层字段sharingType(不在security JSON内部)
3. 向用户输出发现项供评审
4. 针对已评审的流:
读取现有标签,追加#security-reviewed
调用update_store_flow(environmentName, flowName, tags="<现有标签> #security-reviewed")
请勿覆盖security字段——它包含结构化认证数据可用于安全评审的字段:
| 字段 | 位置 | 说明 |
|---|---|---|
| security JSON | |
| 顶层字段 | |
| connections JSON | 流使用的连接器(检查HTTP、自定义连接器) |
| JSON字符串 | 流访问的SharePoint站点、Teams频道、外部URL |
| 顶层字段 | |
每个组织对安全风险的定义不同,例如未认证HTTP触发器对于webhook接收方(Stripe、GitHub)是预期配置,但对于内部流可能存在风险,请结合上下文评审后再标记风险。
9. Environment Governance
9. 环境治理
Audit environments for compliance and sprawl.
1. list_store_environments
Skip entries without displayName (tenant-level metadata rows)
2. Flag:
- Developer environments (sku="Developer") — should be limited
- Non-managed environments (isManagedEnvironment=false) — less governance
- Note: isAdmin=false means the current service account lacks admin
access to that environment, not that the environment has no admin
3. list_store_flows → group by environmentName
- Flow count per environment
- Failure rate analysis: runPeriodFailRate is on the list response —
no need for per-flow get_store_flow calls
4. list_store_connections → group by environmentName
- Connection count per environment审计环境的合规性和资源蔓延情况。
1. 调用list_store_environments
跳过无displayName的条目(租户层级元数据行)
2. 标记以下情况:
- 开发者环境(sku="Developer")——应该限制数量
- 非托管环境(isManagedEnvironment=false)——治理能力较弱
- 注意:isAdmin=false表示当前服务账号缺少该环境的管理员权限,不代表环境没有管理员
3. 调用list_store_flows → 按environmentName分组
- 每个环境的流数量
- 故障率分析:列表返回中已包含runPeriodFailRate,无需逐流调用get_store_flow
4. 调用list_store_connections → 按environmentName分组
- 每个环境的连接数量10. Governance Dashboard
10. 治理仪表盘
Generate a tenant-wide governance summary.
Efficient metrics (list calls only):
1. total_flows = len(list_store_flows())
2. monitored = len(list_store_flows(monitor=true))
3. with_onfail = len(list_store_flows(rule_notify_onfail=true))
4. makers = list_store_makers()
→ active = count where deleted=false
→ orphan_count = count where deleted=true AND ownerFlowCount > 0
5. apps = list_store_power_apps()
→ widely_shared = count where sharedUsersCount > 3
6. envs = list_store_environments() → count, group by sku
7. conns = list_store_connections() → count
Compute from list data:
- Monitoring %: monitored / total_flows
- Notification %: with_onfail / monitored
- Orphan count: from step 4
- High-risk count: flows with runPeriodFailRate > 0.2 (on list response)
Detailed metrics (require get_store_flow per flow — expensive for large tenants):
- Compliance %: flows with businessImpact set / total active flows
- Undocumented count: flows without description
- Tier breakdown: group by tier field
For detailed metrics, iterate all flows in a single pass:
For each flow from list_store_flows (skip sparse entries):
Split id → environmentName, flowName
get_store_flow(environmentName, flowName)
→ accumulate businessImpact, description, tier生成租户全域的治理摘要。
高效指标(仅需列表调用):
1. total_flows = len(list_store_flows())
2. monitored = len(list_store_flows(monitor=true))
3. with_onfail = len(list_store_flows(rule_notify_onfail=true))
4. makers = list_store_makers()
→ active = deleted=false的数量
→ orphan_count = deleted=true且ownerFlowCount > 0的数量
5. apps = list_store_power_apps()
→ widely_shared = sharedUsersCount > 3的数量
6. envs = list_store_environments() → 计数,按sku分组
7. conns = list_store_connections() → 计数
从列表数据计算:
- 监控覆盖率:monitored / total_flows
- 通知配置率:with_onfail / monitored
- 孤儿资源数:来自步骤4
- 高风险流数:runPeriodFailRate > 0.2的流(列表返回中可获取)
详细指标(需要逐流调用get_store_flow——大型租户成本很高):
- 合规率:设置了businessImpact的流 / 总活跃流数
- 未文档化流数:无description的流
- 版本分布:按tier字段分组
如需详细指标,请单轮遍历所有流:
遍历list_store_flows返回的所有流(跳过稀疏条目):
分割id → environmentName, flowName
调用get_store_flow(environmentName, flowName)
→ 累计businessImpact、description、tierField Reference: get_store_flow
Fields Used in Governance
get_store_flow字段参考:治理中用到的get_store_flow
字段
get_store_flowAll fields below are confirmed present on the response.
Fields marked with are also available on (cheaper).
get_store_flow*list_store_flows| Field | Type | Governance use |
|---|---|---|
| string | Archive score (test/demo name detection) |
| string | Archive score, lifecycle management |
| string | License audit (Standard vs Premium) |
| bool | Is this flow being actively monitored? |
| bool | Business-critical designation (settable via update_store_flow) |
| string | Compliance classification |
| string | Compliance attestation |
| string | Ownership accountability |
| string | Escalation contact |
| bool | Failure alerting configured? |
| number | SLA monitoring configured? |
| string | Alert recipients |
| string | Documentation completeness |
| string | Classification — |
| number | Activity level |
| number | Health status |
| ISO string | Last run timestamp |
| ISO string | Data freshness |
| bool | Lifecycle tracking |
| ISO string | Archive score (age) |
| ISO string | Archive score (staleness) |
| JSON string | Orphan detection, ownership audit — parse with json.loads() |
| JSON string | Connector audit, tier — parse with json.loads() |
| JSON string | Archive score (simplicity) — parse with json.loads() |
| JSON string | Auth type audit — parse with json.loads(), contains |
| string | Oversharing detection (top-level, NOT inside security) |
| JSON string | URL audit — parse with json.loads() |
以下所有字段均确认存在于返回结果中,标有的字段也可从获取(成本更低)。
get_store_flow*list_store_flows| 字段 | 类型 | 治理用途 |
|---|---|---|
| 字符串 | 归档评分(检测测试/演示类名称) |
| 字符串 | 归档评分、生命周期管理 |
| 字符串 | 许可审计(标准版vs高级版) |
| 布尔值 | 该流是否正在被主动监控? |
| 布尔值 | 业务关键流标记(可通过update_store_flow设置) |
| 字符串 | 合规分类 |
| 字符串 | 合规证明 |
| 字符串 | 所有权问责 |
| 字符串 | 升级联系人 |
| 布尔值 | 是否已配置故障告警? |
| 数字 | 是否已配置SLA监控? |
| 字符串 | 告警接收人 |
| 字符串 | 文档完整性 |
| 字符串 | 分类—— |
| 数字 | 活跃度 |
| 数字 | 健康状态 |
| ISO字符串 | 上次运行时间戳 |
| ISO字符串 | 数据新鲜度 |
| 布尔值 | 生命周期追踪 |
| ISO字符串 | 归档评分(存续时长) |
| ISO字符串 | 归档评分(更新新鲜度) |
| JSON字符串 | 孤儿检测、所有权审计——用json.loads()解析 |
| JSON字符串 | 连接器审计、版本——用json.loads()解析 |
| JSON字符串 | 归档评分(复杂度)——用json.loads()解析 |
| JSON字符串 | 认证类型审计——用json.loads()解析,包含 |
| 字符串 | 过度共享检测(顶层字段,不在security内部) |
| JSON字符串 | URL审计——用json.loads()解析 |
Related Skills
相关技能
- — Health checks, failure rates, inventory (read-only)
flowstudio-power-automate-monitoring - — Core connection setup, live tool reference
flowstudio-power-automate-mcp - — Deep diagnosis with action-level inputs/outputs
flowstudio-power-automate-debug - — Build and deploy flow definitions
flowstudio-power-automate-build
- — 健康检查、故障率、清单(只读)
flowstudio-power-automate-monitoring - — 核心连接配置、实时工具参考
flowstudio-power-automate-mcp - — 操作级输入/输出深度诊断
flowstudio-power-automate-debug - — 流定义构建与部署
flowstudio-power-automate-build