power-automate-governance について
FlowStudioのキャッシュストアを使い、Power Automateフローの分類、タグ付け、監査を行うガバナンススキルです。ガバナンスやコンプライアンス業務向けで、メタデータの更新はFlowStudio内に限られ、フロー自体は変更しません。
主な機能
- 01ガバナンスメタデータの監査
- 02フローの分類とタグ付け
- 03作成者と所有記録の確認
- 04監視と通知の設定
- 05コネクタとセキュリティ情報の監査
活用シーン
- 01コンプライアンス項目が不足するフローの特定
- 02退職した作成者に関連するフローの特定
- 03コネクタやセキュリティのレビュー準備
- 04重要なフローへのアラート設定
MCP 対応
FlowStudio MCPの`store_*`ツールを使い、キャッシュされたフローやテナント情報を読み取り、ガバナンスメタデータを更新します。更新対象はFlowStudioストアのみで、Power Automateのフロー属性や所有権は変更しません。
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ ninihen1/ power-automate-mcp-skills --skill power-automate-governanceインストール後、Claude Code で/power-automate-governanceを入力して読み込まれたか確認します。
詳細
FlowStudio MCP による Power Automate のガバナンス
FlowStudio MCP のキャッシュストアを通じて、大規模な Power Automate フローの分類、タグ付け、ガバナンスを行います。Dataverse、CoE Starter Kit、Power Automate ポータルは不要です。
このスキルは、power-automate-monitoring と同じ store_* ツールファミリーを使いますが、目的が異なります。ガバナンスではメタデータを書き込み(update_store_flow)、監査と分類の結果を読み取ります。モニタリングでは、同じツールを運用状態の確認に使います。どのスキルがどのツールを「担当する」かを覚える必要はありません。ユーザーが何をしようとしているかに応じて選んでください。状態確認や失敗率ダッシュボードには、代わりに power-automate-monitoring を読み込んでください。
⚠️ Pro+ サブスクリプションが必要です。 このスキルは、FlowStudio for Teams または MCP Pro+ のサブスクライバーのみが使用できる
store_*ツールを呼び出します。ユーザーに Pro+ アクセス権がない場合: 最初の
store_*ツール呼び出しで 403/404 エラーが返されます。その場合は、次の手順に従ってください。
- ストアツールの呼び出しを中止します
- ガバナンス機能には Pro+ サブスクリプションが必要であることをユーザーに伝えます
- https://mcp.flowstudio.app/pricing へのリンクを案内します
ツールの確認:
tools/listではなく、メタツールを使ってツールのスキーマを読み込んでください。標準バンドルにはquery: "skill:governance"を指定してtool_searchを呼び出し、個別のツールにはquery: "select:update_store_flow"を指定します。このスキルでは、ワークフローのパターンとフィールドの意味を説明しています。これらはtool_searchではわかりません。 このドキュメントと実際の API レスポンスが異なる場合は、API の内容を優先してください。
重要:フロー ID の抽出方法
list_store_flows は id を <environmentId>.<flowId> の形式で返します。他のすべてのツールで environmentName と flowName を取得するには、最初の . で分割する必要があります。
id = "Default-<envGuid>.<flowGuid>"
environmentName = "Default-<envGuid>" (everything before first ".")
flowName = "<flowGuid>" (everything after first ".")
また、displayName がないエントリや、state=Deleted のエントリはスキップしてください。これらは情報が不十分なレコードか、Power Automate に存在しなくなったフローです。削除済みのフローに monitor=true が設定されている場合は、監視枠を空けるためにモニタリングを無効にする(monitor=false を指定して update_store_flow を実行する)よう提案してください(標準プランには 20 枠が含まれます)。
書き込みツール:update_store_flow
update_store_flow はFlowStudio のキャッシュのみにガバナンスメタデータを書き込みます。Power Automate のフロー自体は変更しません。これらのフィールドは get_live_flow や PA ポータルには表示されません。FlowStudio のストアにのみ存在し、FlowStudio のスキャンパイプラインと通知ルールで使用されます。
つまり、次のようになります。
ownerTeam/supportEmail— FlowStudio がガバナンス連絡先として扱う担当者を設定します。実際の PA フローの所有者は変更しません。rule_notify_email— FlowStudio の失敗通知/実行不足通知を受け取る宛先を設定します。Microsoft 組み込みのフロー失敗アラートは変更しません。monitor/critical/businessImpact— FlowStudio 内での分類のみを設定します。Power Automate には同等のフィールドがありません。
マージの仕様:指定したフィールドのみが更新されます。更新後のレコード全体が返されます(get_store_flow と同じ形式)。
必須パラメーター:environmentName、flowName。その他のフィールドはすべて任意です。
設定可能なフィールド
| フィールド | 型 | 用途 |
|---|---|---|
monitor | bool | 実行レベルのスキャンを有効にします(標準プラン:20 フローを含む) |
rule_notify_onfail | bool | 実行が失敗した場合にメール通知を送信します |
rule_notify_onmissingdays | number | フローが N 日間実行されていない場合に通知します(0 = 無効) |
rule_notify_email | string | 通知先をカンマ区切りで指定します |
description | string | フローの動作内容 |
tags | string | 分類タグ(説明文の #hashtags からも自動抽出されます) |
businessImpact | string | 低/中/高/重大 |
businessJustification | string | フローが存在する理由と、自動化するプロセス |
businessValue | string | ビジネス価値の説明 |
ownerTeam | string | 責任を負うチーム |
ownerBusinessUnit | string | 事業部門 |
supportGroup | string | サポートのエスカレーショングループ |
supportEmail | string | サポート連絡先のメールアドレス |
critical | bool | ビジネスクリティカルとして指定します |
tier | string | 標準またはプレミアム |
security | string | セキュリティ分類または注記 |
securityに関する注意:get_store_flowのsecurityフィールドには、 構造化された JSON(例:{"triggerRequestAuthenticationType":"All"})が含まれます。"reviewed"のようなプレーンな文字列を書き込むと、この値が上書きされます。フローを セキュリティレビュー済みとしてマークするには、代わりにtagsを使用してください。
ガバナンスのワークフロー
1. コンプライアンス詳細レビュー
必須のガバナンスメタデータが不足しているフローを特定します。
1. Ask the user which compliance fields they require
2. list_store_flows
3. For each active flow: split id, call get_store_flow, check required fields
4. Report non-compliant flows with missing fields listed
5. For updates: ask for values, then update_store_flow(...provided fields)
一般的なコンプライアンスフィールド:description、businessImpact、
businessJustification、ownerTeam、supportEmail、monitor、
rule_notify_onfail、critical。フラグを設定する前に、ユーザーのポリシーを確認してください。
2. 孤立したリソースの検出
削除済み、または無効化された Azure AD アカウントが所有するフローを検索します。
1. list_store_makers
2. Filter where deleted=true AND ownerFlowCount > 0
3. list_store_flows → collect all flows
4. For each active flow: split id, get_store_flow, parse owners JSON
5. Match owner principalId against orphaned maker id
6. Reassign governance contact or stop/tag for decommission
update_store_flow では実際の PA 所有者は変更されません。変更には管理センター
または PowerShell を使用してください。孤立しているように見えるフローの中には、システムによって生成されたものもあります。適切な場合は再割り当てせずにタグを付けてください。ストアの情報は最新のスキャン時点までの内容です。
3. アーカイブスコアの計算
フローごとに非アクティブスコア(0~7)を計算し、整理候補を特定します。
1. list_store_flows
2. For each active flow: split id, get_store_flow
3. Add 1 point each: created≈modified, test/demo/temp/copy name, age >12mo,
stopped/suspended, no owners, no recent runs, complexity.actions < 5
4. Score 5-7: recommend archive; 3-4: tag #archive-review; 0-2: active
5. For confirmed archive: set_live_flow_state(..., "Stopped") and append #archived
MCP によるアーカイブでは、フローを停止してタグを付けます。削除にはポータルまたは管理者用 PowerShell が必要です。
4. コネクタの監査
監視対象のフロー全体で、どのコネクタが使用されているかを監査します。DLP の影響分析やプレミアムライセンスの計画に役立ちます。
1. list_store_flows(monitor=true)
2. For each active flow: split id, get_store_flow, parse connections JSON
3. Group by apiName; flag Premium tier, HTTP connectors, custom connectors
4. Report inventory to user
可能な場合は監視対象のフローに範囲を絞ってください。get_store_flow の呼び出しには時間がかかります。
list_store_connections で一覧表示されるのは接続インスタンスであり、フローごとのコネクタ使用状況ではありません。DLP ポリシーは公開されていないため、コネクタの分類はユーザーに確認してください。
5. 通知ルールの管理
大規模なフロー群の監視とアラートを設定します。
Enable failure alerts on all critical flows:
1. list_store_flows(monitor=true)
2. For each active flow: split id, get_store_flow
3. If critical=true and rule_notify_onfail is false, update_store_flow(...,
rule_notify_onfail=true, rule_notify_email="[email protected]")
Enable missing-run detection for scheduled flows:
1. list_store_flows(monitor=true)
2. For active Recurrence flows: get_store_flow
3. If rule_notify_onmissingdays is 0/missing, update_store_flow(...,
rule_notify_onmissingdays=2)
monitor=true を一括で有効にする前に、監視の上限を確認してください。
critical=true のフローがない場合は、アラートを設定する前にガバナンス上のギャップとして報告してください。
6. 分類とタグ付け
コネクタの種類、ビジネス機能、リスクレベルに基づいてフローを一括分類します。
Auto-tag by connector:
1. list_store_flows
2. For each active flow: split id, get_store_flow, parse connections JSON
3. Map apiName values to tags (#sharepoint, #teams, #email, #custom-connector)
4. Read existing store tags, append new tags, update_store_flow(tags=...)
ストアのタグと説明文のハッシュタグは別々のシステムです。tags= はストアのタグを上書きするため、読み取り、追加、書き込みの順に行ってください。指示がない限り、計算済みの tier を上書きしないでください。
7. 作成者のオフボーディング
従業員が退職する際は、その従業員のフローとアプリを特定し、FlowStudio のガバナンス連絡先と通知先を再割り当てします。
1. get_store_maker(makerKey="<departing-user-aad-oid>")
→ check ownerFlowCount, ownerAppCount, deleted status
2. list_store_flows → collect all flows
3. For each active flow: split id, get_store_flow, parse owners JSON
4. Flag flows whose owner principalId matches the departing user's OID
5. list_store_power_apps → filter ownerId
6. For kept flows: update ownerTeam/supportEmail/rule_notify_email; consider
add_live_flow_to_solution before account deletion
7. For retired flows: set_live_flow_state(..., "Stopped") and tag #decommissioned
8. Report: flows reassigned, flows migrated to solutions, flows stopped,
apps needing manual reassignment
これは FlowStudio のガバナンス連絡先を変更するもので、実際の PA 所有者は変更されません。Power Apps の所有者の変更は、手動または管理センターで行う必要があります。
8. セキュリティレビュー
キャッシュされたストアデータを使用して、潜在的なセキュリティ上の懸念がないかフローを確認します。
1. list_store_flows(monitor=true)
2. For each active flow: split id, get_store_flow
3. Parse security/connections/referencedResources JSON; read sharingType top-level
4. Report findings; for reviewed flows append #security-reviewed tag
セキュリティシグナル:security.triggerRequestAuthenticationType、sharingType、
connections、referencedResources、tier。構造化された security
フィールドは決して上書きしないでください。レビュー済みのフローには、代わりにタグを付けてください。
9. 環境のガバナンス
コンプライアンスと乱立状況について環境を監査します。
1. list_store_environments
Skip entries without displayName (tenant-level metadata rows)
2. Flag:
- Developer environments
- Non-managed environments
- Environments where service account lacks admin access (isAdmin=false)
3. list_store_flows → group by environmentName
4. list_store_connections → group by environmentName
10. ガバナンスダッシュボード
テナント全体のガバナンス概要を生成します。
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/apps/envs/conns = list_store_makers/list_store_power_apps/list_store_environments/list_store_connections
5. Compute monitoring %, notification %, orphan count, high-failure count
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
フィールドリファレンス:ガバナンスで使用する get_store_flow のフィールド
以下のフィールドはすべて、get_store_flow のレスポンスに含まれることが確認されています。
* が付いたフィールドは、list_store_flows でも利用できます(低コスト)。
| フィールド | 型 | ガバナンスでの用途 |
|---|---|---|
displayName * | string | アーカイブスコア(テスト/デモ名の検出) |
state * | string | アーカイブスコア、ライフサイクル管理 |
tier | string | ライセンス監査(Standard と Premium の比較) |
monitor * | bool | このフローは現在、積極的に監視されていますか? |
critical | bool | ビジネスクリティカルの指定(update_store_flow で設定可能) |
businessImpact | string | コンプライアンス分類 |
businessJustification | string | コンプライアンスの証明 |
ownerTeam | string | 所有責任 |
supportEmail | string | エスカレーション先の連絡先 |
rule_notify_onfail | bool | 失敗時のアラートが設定されていますか? |
rule_notify_onmissingdays | number | SLA 監視が設定されていますか? |
rule_notify_email | string | アラートの送信先 |
description | string | ドキュメントの完全性 |
tags | string | 分類 — list_store_flows に表示されるのは、説明から抽出されたハッシュタグのみです。update_store_flow で書き込まれたストアタグを読み取るには、get_store_flow が必要です |
runPeriodTotal * | number | アクティビティレベル |
runPeriodFailRate * | number | 健全性ステータス |
runLast | ISO string | 最終実行のタイムスタンプ |
scanned | ISO string | データの鮮度 |
deleted | bool | ライフサイクルの追跡 |
createdTime * | ISO string | アーカイブスコア(経過期間) |
lastModifiedTime * | ISO string | アーカイブスコア(古さ) |
owners | JSON string | 孤立の検出、所有者の監査 — json.loads() で解析 |
connections | JSON string | コネクタの監査、階層 — json.loads() で解析 |
complexity | JSON string | アーカイブスコア(単純さ) — json.loads() で解析 |
security | JSON string | 認証タイプの監査 — json.loads() で解析し、triggerRequestAuthenticationType を含みます |
sharingType | string | 過剰共有の検出(トップレベルであり、security 内ではありません) |
referencedResources | JSON string | URL の監査 — json.loads() で解析 |
関連スキル
power-automate-monitoring— 健全性チェック、失敗率、インベントリ(読み取り専用)power-automate-mcp— 基盤スキル:接続のセットアップ、MCP ヘルパー、ツールの検出power-automate-debug— アクションレベルの入力/出力を用いた詳細な診断power-automate-build— フロー定義の構築とデプロイ