Skip to content

Laskewitz/inventory-report

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Power Platform Inventory Report

This repository contains Agent Skills, prompt files, and a custom agent for generating Power Platform inventory reports and governance analysis. Use these with GitHub Copilot to query your Power Platform estate, analyze settings for risks, and produce polished reports — all from within VS Code or the GitHub Copilot CLI.

Sample report

Reports include headline stats, health scores, critical findings with risk explanations, and prioritized recommendations with exact pac CLI commands to fix each issue. Dark mode is the default, with a toggle for light mode.

Overview

Dark mode (default) Light mode
Overview – dark Overview – light

Environments

Dark mode (default) Light mode
Environments – dark Environments – light

Resources

Dark mode (default) Light mode
Resources – dark Resources – light

Tenant Governance

Dark mode (default) Light mode
Tenant Governance – dark Tenant Governance – light

DLP Policies

Dark mode (default) Light mode
DLP Policies – dark DLP Policies – light

Environment Settings

Dark mode (default) Light mode
Environment Settings – dark Environment Settings – light

Recommendations

Dark mode (default) Light mode
Recommendations – dark Recommendations – light

What's included

Skills (.github/skills/)

Skills are portable, auto-discovered capabilities that follow the Agent Skills open standard.

Skill Description
inventory-report Generate a self-contained HTML report. Collects data from the inventory API and Power Platform CLI, analyzes governance gaps, and uses the frontend-design skill to produce a polished visual document saved under reports/YYYYMMDD/HHmm/.
inventory-analysis Output findings as structured markdown directly in GitHub Copilot CLI or Chat. Same data collection and analysis — no file output.
frontend-design Generate distinctive, production-grade HTML interfaces. Used by the inventory-report skill to render the final report.

Both inventory skills share a common data reference: inventory-data.md — the complete API reference, schema, data collection strategy, CLI commands, and analysis framework.

Custom agent (.github/agents/)

Agent Description
@Power Platform Admin A Power Platform administration expert that collects data via pac CLI commands, analyzes governance posture, and can hand off to generate HTML reports.

Invoke with @Power Platform Admin in Copilot Chat. The agent runs pac commands directly in the terminal — it does not use MCP server tools.

Prompt files (.github/prompts/)

Reusable slash commands available in VS Code Copilot Chat:

Command Description
/generate-report Generate a full HTML inventory report under reports/YYYYMMDD/HHmm/ and open it in the VS Code integrated browser
/quick-analysis Run a quick governance analysis and show results as markdown in chat
/check-dlp Focused DLP policy coverage check — flags uncovered environments, permissive groupings, and missing blocks
/check-environments Audit environment settings for gaps — flags disabled auditing, missing timeouts, and non-compliant configurations

All prompt files route through the @Power Platform Admin custom agent.

Custom instructions (.github/copilot-instructions.md)

Project-wide instructions automatically included in every Copilot conversation in this repo. Ensures Copilot always:

  • Knows about the inventory API, pac CLI, and available skills
  • Runs pac commands directly in the terminal (not via MCP)
  • Analyzes data for gaps and risks — never dumps raw output
  • Explains WHY each issue matters and HOW to fix it
  • Produces self-contained .html reports with no external dependencies

Prerequisites

1. GitHub Copilot

You need an active GitHub Copilot subscription and one of:

  • VS Code with the GitHub Copilot extension — sign in to your GitHub account in VS Code
  • GitHub Copilot CLI — authenticate with gh auth login

2. Azure CLI (for the Inventory API)

The Power Platform inventory API queries Azure Resource Graph. You authenticate via the Azure CLI.

Install:

# macOS
brew install azure-cli

# Windows
winget install Microsoft.AzureCLI

# Linux (Debian/Ubuntu)
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash

Authenticate:

az login

Your account must have sufficient permissions to query Azure Resource Graph for Power Platform resources (typically Global Admin, Power Platform Admin, or a role with Microsoft.ResourceGraph/resources/read).

3. Power Platform CLI (for tenant settings & DLP policies)

The Power Platform CLI (pac) is used to retrieve tenant settings, DLP policies, environment settings, and more.

Install:

# Using .NET tool (cross-platform, recommended)
dotnet tool install --global Microsoft.PowerApps.CLI.Tool

# Or via VS Code extension
# Install "Power Platform Tools" from the VS Code marketplace

See Install Microsoft Power Platform CLI for all options.

Authenticate:

pac auth create

This opens a browser for interactive sign-in. Your account needs Power Platform Admin or Global Admin permissions to retrieve tenant settings and DLP policies.

4. Playwright CLI (for report screenshots — optional)

The screenshot script (scripts/take-screenshots.mjs) uses Playwright to capture full-page screenshots of the generated report.

Install:

npm install -g @playwright/cli@latest
npx playwright install chromium

Getting started

  1. Install and authenticate with the prerequisites above
  2. Open this repository in VS Code
  3. Use any of the approaches below:
    • Slash commands: Type /generate-report, /quick-analysis, /check-dlp, or /check-environments in Copilot Chat
    • Custom agent: Type @Power Platform Admin followed by your question in Copilot Chat
    • Direct: Ask Copilot to generate an inventory report — the skills are auto-discovered from .agents/skills/
  4. Reports are saved under reports/YYYYMMDD/HHmm/ and automatically opened in the VS Code integrated browser

Report output

Generated reports are saved in timestamped directories:

reports/
  20260413/
    1540/
      inventory-report.html
  20260414/
    0930/
      inventory-report.html

Report directories are git-ignored. The reports/README.md placeholder is tracked.

Resources

About

Inventory API Skills

Topics

Resources

Stars

Watchers

Forks

Contributors