# Azure Policy Effect and Existence Reviewer

> Reviews Azure Policy definition JSON for effect and existenceCondition problems: missing or always-true conditions, bad effect defaults, missing remediation roles, Owner roles, empty default lists and mode mismatches. Offline and read-only.

Azure Policy Effect and Existence Reviewer is a paid AI agent skill on Agensi by Abdelrhman Fikri, in DevOps & Cloud. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $9.99 (one-time purchase)
- Creator: [Abdelrhman Fikri](https://www.agensi.io/creators/abdelrhman-fikri)
- Category: [DevOps & Cloud](https://www.agensi.io/skills/devops-cloud)
- Version: 1.0.0
- Last updated: 2026-12-04
- Security: scan passed (2026-12-04); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/azure-policy-effect-and-existence-reviewer
- Tags: azure, azure-policy, governance, compliance, security, devops, auditifnotexists, deployifnotexists

## What it does

- Reads policy definitions from az policy output, portal exports, value lists and ARM templates
- Flags missing details, deployment templates, remediation roles and modify operations as blockers
- Warns when an existenceCondition is missing or always true, so a policy can never report
- Flags Owner and User Access Administrator remediation roles, and warns about Contributor
- Checks effect parameters: defaults outside allowedValues, Disabled defaults and unknown effects
- Warns about unused or undefined parameters, empty default lists, no type check and the wrong mode

## Who it's for

- **Governance engineers:** A pre-assignment review of effect and existence logic Try: "Review these policy definitions before I assign them"
- **Security reviewers:** A list of policies that never report or run as Owner Try: "Which of these policies would remediate as Owner?"

## About this skill

Azure Policy definitions can look right and still do nothing, or do too much. An audit policy with no existence condition never reports, a deploy policy without a role cannot fix anything, and a remediation role of Owner hands out far more access than needed. These mistakes are easy to miss in a long JSON file.

Export your definitions with the az CLI (or point at an ARM template) and ask your agent to run this skill. It reads the files on your machine, never contacts Azure, and returns blockers to fix first, warnings to review and notes. Every line names the policy and says what to change.

It also checks effect parameters, unused or undefined parameters, empty default lists and the policy mode. Example definitions with expected results are included so you can see it work before you use your own.

## Known limitations

- It reads definition JSON only; it cannot see assignments, exemptions, parameters set at assignment time or what resources exist.
- It does not evaluate the rule against real resources; a condition that looks fine can still miss them.
- Only the fixed checks are made; aliases and field names are not validated against the provider.
- Initiatives (policy sets) are not reviewed; export and scan each definition.
- Reports and explains; it never edits definitions.

## Technical details

A single standard-library Python script. It makes no network calls and never writes files. Give it files or directories; it reads .json.

Accepted input: az policy definition show or list output, portal exports with a properties object, an object with a value list, or an ARM template with policyDefinitions resources.

Effect: a literal effect or [parameters('effect')] with allowedValues and defaultValue. Checks: default outside allowedValues, Disabled default, no default, unknown effect names.
Existence effects (AuditIfNotExists, DeployIfNotExists): details and details.type present; existenceCondition present and not always true; details.name required when details.type equals the type in if.
Remediation (DeployIfNotExists, Modify): roleDefinitionIds present (Owner and User Access Administrator are blockers, Contributor a warning); deployment template present; Modify operations present.
Rule: a type check in if; Indexed mode with a resource group or subscription type; parameters used but undefined, defined but unused; array parameters with an empty default used in in or notIn.

Exit codes: 0 no blockers, 1 blockers found, 2 bad arguments. Options: --format json, --hide-info.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Azure Policy Effect and Existence Reviewer skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### Does it need Azure access?

No. It reads JSON files you save yourself.

### Which files can it read?

az policy definition output, portal exports, value lists and ARM templates with policyDefinitions.

### Can it check built-in policies?

Yes, if you export their JSON, though you may not be able to change them.

### Which Python?

Python 3.9 or newer, no packages to install.

### What does exit code 1 mean?

One or more BLOCKER findings. Warnings alone still exit 0.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
