For Agents
Query current Azure Policy compliance state and summaries at any scope (management group, subscription, resource group, resource, assignment, definition) through 18 OData query endpoints.
Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the PolicyStatesClient, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.
# On the machine that will host your Jentic One instance:
curl -fsSL https://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | sh# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL https://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | sh
jentic register # connects your agent to your Jentic One instanceJentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.
What an agent can do with PolicyStatesClient API.
Query compliance state for every resource in a subscription against every assigned policy
Summarise compliance state at any scope to count compliant and non-compliant resources
Filter compliance state by policy assignment, definition, or set definition
Retrieve compliance state for a single resource for use in admission and gate workflows
GET STARTED
Use for: I need to list all non-compliant resources in our production subscription, Get a compliance summary at management group scope for board reporting, Find all resources non-compliant with the 'allowed locations' policy assignment, Check whether a specific virtual machine is currently compliant with all assigned policies
Not supported: Does not author policies, manage assignments, or return historical evaluation events — use for querying current compliance state and aggregated compliance summaries only.
Jentic publishes the only available OpenAPI document for PolicyStatesClient, keeping it validated and agent-ready.
Jentic publishes the only available OpenAPI specification for PolicyStatesClient, keeping it validated and agent-ready. The Azure Policy Insights states API exposes 18 query and summary endpoints under Microsoft.PolicyInsights for retrieving the current compliance state of resources against assigned policies. Use it to query compliance state at management group, subscription, resource group, individual resource, policy assignment, policy definition, or policy set definition scope, and to retrieve aggregated compliance summaries that power compliance dashboards and alerting.
Walk compliance state at management group scope for cross-subscription dashboards
Aggregate compliance counts by resource type or policy for executive reporting
Detect non-compliant resources to feed remediation tickets or workflows
Patterns agents use PolicyStatesClient API for, with concrete tasks.
★ Compliance Dashboard Backend
Power a compliance dashboard by calling the summarize endpoints at the appropriate scope. The summary returns compliant and non-compliant resource counts per policy assignment, per definition, and overall, which is enough to render a traffic-light dashboard without iterating individual resources. For drilldowns the dashboard then queries the per-resource state endpoint with filters matching the cell the user clicked.
Call the policyStates 'latest' summarize endpoint at the production subscription, return the total compliant and non-compliant counts, and break the non-compliant count down by policy assignment
Remediation Workflow Trigger
Detect non-compliance and trigger remediation. A scheduled query against the latest compliance state, filtered to specific policy assignments, returns the list of resources that need fixing. The agent can pipe these resource IDs into ServiceNow tickets, an automated remediation runbook, or PolicyTrackedResources deployIfNotExists evaluation, closing the loop between detection and fix.
Query latest policyStates filtered to policyAssignmentName='require-encryption' and complianceState='NonCompliant', and create a ticket for each returned resource ID
Pre-Deployment Compliance Gate
Before promoting an environment, call the per-resource compliance state for every resource in the target resource group. If any resource is non-compliant the promotion is blocked until the policy violation is resolved. The OData filter on policyAssignmentId allows the gate to focus on a defined set of critical policies rather than the full assignment list, keeping the gate fast and predictable.
Query latest policyStates at resource group 'staging-api', filter to a critical policy assignment list, and return the deployment block decision (block if any NonCompliant)
AI Agent Compliance Monitor
An AI agent supporting a security or governance team can monitor compliance state through Jentic. The agent searches by intent ('list non-compliant azure resources'), Jentic returns the latest policyStates queryResults operation with its OData filter schema, and the agent executes the call with managed Azure credentials. Summary calls for executive reporting follow the same intent-driven flow.
Search Jentic for 'list non-compliant Azure resources', load the policyStates queryResults schema, and execute it for the production subscription with complianceState='NonCompliant'
18 endpoints — jentic publishes the only available openapi specification for policystatesclient, keeping it validated and agent-ready.
METHOD
PATH
DESCRIPTION
/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
Query compliance state at subscription scope
/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize
Summarise compliance counts at subscription scope
/providers/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
Query compliance state at management group scope
/providers/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize
Summarise compliance counts at management group scope
/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
Query compliance state for a specific policy assignment
/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyDefinitions/{policyDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
Query compliance state for a specific policy definition
/providers/Microsoft.PolicyInsights/operations
List Microsoft.PolicyInsights provider operations
/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
Query compliance state at subscription scope
/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize
Summarise compliance counts at subscription scope
/providers/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
Query compliance state at management group scope
/providers/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize
Summarise compliance counts at management group scope
Three things that make agents converge on Jentic-routed access.
Credential isolation
Azure service principal credentials are encrypted in the Jentic vault. Agents receive scoped ARM bearer tokens at execution time and never see the underlying client secret.
Intent-based discovery
Agents search by intent ('list non-compliant azure resources' or 'summarise azure compliance') and Jentic returns the matching scope-specific operation, avoiding the need to pick between the seven scope variants and queryResults vs summarize manually.
Time to first call
Direct ARM integration: half a day for AAD app registration, MSAL token handling, and OData filter construction. Through Jentic: under 30 minutes.
Alternatives and complements available in the Jentic catalogue.
Azure Policy Events
Query historical evaluation events alongside current compliance state.
Use Policy Events for 'when did this become non-compliant'; use Policy States for 'what is non-compliant now'.
Azure Policy
Author and assign the policies this API reports compliance against.
Use Policy to assign rules; use Policy States to monitor whether resources meet them.
Azure Policy Tracked Resources
List resources modified by deployIfNotExists or modify policies.
Use Tracked Resources to inspect remediation outputs; use Policy States for compliance posture.
Azure Policy Metadata
Look up regulatory descriptions for the policies whose state this API reports.
Use Policy Metadata to add audit context to a Policy States compliance report.
Specific to using PolicyStatesClient API through Jentic.
Why is there no official OpenAPI spec for PolicyStatesClient?
Microsoft Azure does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call PolicyStatesClient via structured tooling. It is validated against the live API and kept up to date. Get started at https://app.jentic.com/sign-up.
What authentication does the Azure Policy States API use?
It uses Azure Active Directory OAuth 2.0 against https://management.azure.com/ with the user_impersonation scope. The caller needs Reader on Microsoft.PolicyInsights at the queried scope. Jentic stores service principal credentials encrypted and issues short-lived bearer tokens at execution time.
Can I get a compliance summary at management group scope through this API?
Yes. POST to /providers/Microsoft.Management/managementGroups/{name}/providers/Microsoft.PolicyInsights/policyStates/latest/summarize. The response returns compliant and non-compliant resource counts aggregated across every subscription beneath the management group.
What are the rate limits for the Policy States API?
Azure Resource Manager applies subscription-level throttling at roughly 1,200 reads per hour. Compliance state results can be large; use $top and $skiptoken pagination, and prefer summarize endpoints over queryResults when only counts are needed.
How do I list non-compliant resources through Jentic?
Run pip install jentic and search for 'list non-compliant Azure resources'. Jentic returns the policyStates 'latest' queryResults operation; load its schema and execute it with $filter=complianceState eq 'NonCompliant' at the desired scope.
What is the difference between latest and a date-pinned policyStates resource?
policyStates/latest returns the most recent evaluation result for each resource and is what dashboards typically query. Date-pinned values like policyStates/default return the state as recorded for a particular evaluation cycle, useful for reproducing a historical snapshot or investigating a specific evaluation.
/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
Query compliance state for a specific policy assignment
/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyDefinitions/{policyDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
Query compliance state for a specific policy definition
/providers/Microsoft.PolicyInsights/operations
List Microsoft.PolicyInsights provider operations