audit-permissions
Audits existing table permissions on a Power Pages site by analyzing them against site code and Dataverse metadata. Generates an HTML audit report with findings grouped by severity (critical, warning, info, pass) and suggests fixes for issues found
Install / Use
npx skills add microsoft/power-platform-skills --skill audit-permissionsInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
SecuritySupported Platforms
Our assessment of audit-permissions
audit-permissions scores 85/100 on our quality scale, 766th of 1,119 Security skills we index.
Its SKILL.md is 27 KB long, well organised into 28 sections with 11 code examples: a thorough specification that gives an agent plenty to work with.
It has 919 GitHub stars, a meaningful sign that others use it.
Maintenance, license and trust
- The repository was last updated 12 days ago, so audit-permissions is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
audit-permissions compared with similar skills
All 4 of these similar skills score higher than audit-permissions; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| audit-permissions (this skill)by microsoft | 85 | 919 | 12d ago | SKILL.md |
| algorithmic-artby anthropics | 100 | 177.9k | 14d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 14d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 130.2k | 15d ago | SKILL.md |
| ui-ux-pro-maxby nextlevelbuilder | 100 | 130.2k | 15d ago | SKILL.md |
Frequently asked questions
- How do I install audit-permissions?
- Run
npx skills add microsoft/power-platform-skills --skill audit-permissions. The install tabs above show the steps for each supported agent. - Which AI agents does audit-permissions work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is audit-permissions safe to use?
- It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is audit-permissions still maintained?
- The repository was last updated 12 days ago, so audit-permissions is actively maintained.
Skill content
View source on GitHubname: audit-permissions description: >- Audits existing table permissions on a Power Pages site by analyzing them against site code and Dataverse metadata. Generates an HTML audit report with findings grouped by severity (critical, warning, info, pass) and suggests fixes for issues found. Use when the user wants to review, verify, or check table permissions for security issues. user-invocable: true argument-hint: "[optional: specific table or concern]" allowed-tools: Read, Write, Bash, Glob, Grep, AskUserQuestion, TaskCreate, TaskUpdate, TaskList, Agent model: opus
Plugin check: Run
node "${PLUGIN_ROOT}/scripts/check-version.js"— if it outputs a message, show it to the user before proceeding.
Audit Permissions
Audit existing table permissions on a Power Pages code site. Analyze permissions against the site code and Dataverse metadata, then generate a visual HTML audit report with findings, reasoning, and suggested fixes.
Workflow
- Verify Site Deployment — Check that
.powerpages-sitefolder and table permissions exist - Gather Configuration — Read all web roles, table permissions, and site code
- Run Local Schema Validation — Use the shared validator to detect invalid permission/site-setting YAML before deeper analysis
- Analyze & Discover — Query Dataverse for relationships and lookup columns using deterministic scripts
- Run Audit Checks — Compare permissions against code usage and best practices
- Generate Report — Create the HTML audit report and display in browser
- Present Findings & Track — Summarize findings, record skill usage, and ask user if they want to fix issues
Important: Do NOT ask the user questions during analysis. Autonomously gather all data, then present findings.
Task Tracking
At the start of Step 1, create all tasks upfront using TaskCreate. Mark each task in_progress when starting and completed when done.
| Task subject | activeForm | Description | |-------------|------------|-------------| | Verify site deployment | Verifying site deployment | Check .powerpages-site folder and table permissions exist | | Gather configuration | Gathering configuration | Read web roles, table permissions, and site code | | Run local schema validation | Validating local permissions schema | Run shared validator against existing table permission and site setting YAML | | Discover relationships | Discovering relationships | Query Dataverse for lookup columns and relationships | | Run audit checks | Running audit checks | Create per-table tasks and run checklist (A–K) for each table, then cross-validate | | Generate audit report | Generating audit report | Create HTML report and display in browser | | Present findings | Presenting findings | Summarize results, record usage, and offer to fix issues |
Note: The "Run audit checks" phase creates additional per-table tasks dynamically in Step 4.2. These per-table tasks track the systematic A–K checklist for each table independently.
Step 1: Verify Site Deployment
Use Glob to find:
**/powerpages.config.json— identifies the project root**/.powerpages-site/table-permissions/*.tablepermission.yml— existing permissions
If no .powerpages-site folder exists, stop and tell the user to deploy first using /deploy-site.
If no table permissions exist, note this as a critical finding (the site may have no data access configured) and continue the audit — there may still be code references that need permissions.
Step 2: Gather Configuration
2.1 Read Web Roles
Read all files matching **/.powerpages-site/web-roles/*.yml. Extract id, name, anonymoususersrole, authenticatedusersrole from each.
2.2 Read Table Permissions
Read all files matching **/.powerpages-site/table-permissions/*.tablepermission.yml. For each permission, extract:
entityname(permission name)entitylogicalname(table)scope(numeric code)read,create,write,delete,append,appendto(boolean flags)adx_entitypermission_webrole(array of web role UUIDs)contactrelationship,accountrelationship(if Contact/Account scope)parententitypermission,parentrelationship(if parent scope)
2.3 Analyze Site Code
Search the site source code for:
- Web API calls (
/_api/) - Lookup bindings (
@odata.bind) - File uploads (
uploadFileColumn,uploadFile,upload*Photo,upload*Image) $expandusage ($expand,buildExpandClause,ExpandOption)
Also check for .datamodel-manifest.json in the project root for the authoritative table list.
Build a map of: which tables are referenced in code, which CRUD operations are performed on each, which lookup relationships are used, and which related tables are fetched via $expand (these need read permissions too).
2.4 Run Shared Schema Validator
Run the shared validator against the existing site:
node "${PLUGIN_ROOT}/scripts/validate-permissions-schema.js" --projectRoot "<PROJECT_ROOT>"
Parse the JSON output and carry the findings into the audit. Treat:
errorfindings as criticalwarningfindings as warninginfofindings as info
These findings should be included in the final audit report even if the later code/Dataverse analysis also finds additional issues.
If the validator reports wildcard field access in a Webapi/<table>/fields setting, add this
critical finding to the report:
- Severity:
critical - Title:
Unsupported wildcard Web API fields for <table> - Reasoning: The fields setting uses wildcard access, which is unsupported beginning September 14, 2026
- Fix: Replace the wildcard using
${PLUGIN_ROOT}/references/webapi-field-allowlist.md: LogicalNames for ordinary columns,_<LogicalName>_valuefor lookup reads, and exact Navigation Properties used by@odata.bind - Details: Include the site-setting file path and setting name from the validator finding
After Step 3.1 determines the environment URL, if this audit is running locally with Dataverse access available, rerun the shared validator with live relationship verification enabled and merge any additional findings:
node "${PLUGIN_ROOT}/scripts/validate-permissions-schema.js" --projectRoot "<PROJECT_ROOT>" --validate-dataverse-relationships --envUrl "<envUrl>"
Use this Dataverse-backed relationship validation only for local runs. Do not require it in CI or other offline contexts.
Step 3: Analyze & Discover (Dataverse API)
Use deterministic Node.js scripts for all Dataverse API calls. These scripts handle auth token acquisition, HTTP requests, and JSON parsing consistently.
3.1 Get Environment URL
pac env who
Extract the Environment URL (e.g., https://org12345.crm.dynamics.com) and use it as <envUrl> in subsequent script calls.
3.2 Query Lookup Columns
For each table that has permissions with create or write enabled, use the lookup query script:
node "${PLUGIN_ROOT}/skills/audit-permissions/scripts/query-table-lookups.js" --envUrl "<envUrl>" --table "<table_logical_name>"
The script returns a JSON array of { logicalName, targets } for each lookup column. Capture this output for the maps described below.
After querying all tables with create or write permissions, build two maps from the combined results:
- Source map (table → lookup columns): For each queried table, record which lookup columns it has and their targets. Used in Section H2 to check
appendtoon the source table. - Reverse target map (target table → list of source tables): For each target table found in any lookup's
targetsarray, record which source table(s) reference it. Used in Section H to checkappendon the target table.
Example: querying order_item returns [{ logicalName: "cr4fc_orderid", targets: ["cr4fc_order"] }]
- Source map:
order_item → [{ column: "cr4fc_orderid", targets: ["cr4fc_order"] }] - Reverse target map:
cr4fc_order → [{ sourceTable: "order_item", column: "cr4fc_orderid" }]
Both maps are used in Sections H and H2:
- The source table (with the lookup) needs
appendto: true— it links TO other records (checked via the source map) - Each target table in
targetsneedsappend: true— other records link TO it (checked via the reverse target map)
3.3 Query Relationships
For tables with parent-scope permissions, verify the relationship names using the relationship query script:
node "${PLUGIN_ROOT}/skills/audit-permissions/scripts/query-table-relationships.js" --envUrl "<envUrl>" --table "<parent_table>"
The script returns a JSON array of { schemaName, referencedEntity, referencingEntity, referencingAttribute }. Use schemaName to validate the parentrelationship value in parent-scope permissions.
Error Handling
If any script exits with code 1, skip the API-dependent checks and note which checks were skipped in the report. Do NOT stop the entire audit for auth errors. Use the data model manifest and code analysis as fallback.
Step 4: Run Audit Checks
Use per-table task tracking to systematically run every audit check. Each check produces a finding with severity, title, reasoning, and a suggested fix. Findings can be critical, warning, info, or pass.
4.1 Build Audit Inventory
First, build a combined list of all tables to audit from two sources:
- Tables referenced in code (from Step 2.3) — these may or may not have permissions
- Tables with existing permissions (from Step 2.2) — these may or may not be referenced in code
The union of these two sets is the complete audit scope. Each table will be audited from both directions: "does the code need a permission that doesn't exist?" and "does the permission match what the code actually does?"
4.2 Create Per-Table Audit Tasks
For each table in the audit inventory, create a task:
TaskCreate:
subject: "Audit <table_logical_name>"
activeForm: "Auditing <table_display_name> permissions"
description: "Run all audit checks for <table_logical_name>"
Also create a summary task:
TaskCreate:
subject: "Compile audit findings"
activeForm: "Compiling audit findings"
description: "Combine all per-table findings into the final report"
Use TaskList at any point to review progress and see which tables still need auditing.
4.3 Per-Table Audit Checklist
For each table, mark its task in_progress and run through the following checks in order. For every finding, note the specific evidence (file path, permission name, code pattern) that supports it. Skip checks that don't apply to this table.
A. Permission Existence
Does this table have a table permission?
- If the table is referenced in code but has no permission → finding:
- Severity:
critical - Title:
Missing permission for <table> - Reasoning: Which code files reference this table and what operations they perform
- Fix: Create a permission with the appropriate scope and CRUD flags
- Severity:
- If a permission exists but the table is not referenced in code → finding:
- Severity:
info - Title:
Unused permission for <table> - Reasoning: The table is not referenced in any source code — the permission may be unnecessary
- Fix: Review whether this permission is still needed
- Severity:
- If both exist →
pass, proceed to remaining checks
B. Web Role Association
Does the permission have web role(s) assigned?
- Check
adx_entitypermission_webrole— if empty or missing → finding:- Severity:
warning - Title:
Permission <name> has no web role association - Reasoning: A permission without a web role has no effect — no users will receive this access
- Fix: Associate with the appropriate web role
- Severity:
- If roles are assigned →
pass
C. Scope Appropriateness
Is the scope the least-privileged option that fits?
- Search the service co
Truncated for display — read the full file on GitHub.
Related Skills
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
design
130.2kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG…
ui-ux-pro-max
130.2kUI/UX design intelligence for web, mobile, and desktop. This skill should be used when designing, building, reviewing, or fixing interfaces, including pages, components, design systems, accessibility, interaction, responsive layout, typography, color, charts, and stack-specific UI implementation.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
