How Arinco uses AI agents to accelerate Azure Policy testing

A policy can look right on paper and still behave differently than expected. As your Azure Policy library grows, how do you check every change without slowing development?

Azure Policy is the Azure governance service that lets organisations set and enforce standards, assess compliance at scale and prevent misconfigurations. For Managed Services customers, that makes policy a practical safeguard: it helps keep environments secure, compliant and consistent as they change, without relying on people to catch every issue by hand. But policy is only useful when it expresses the intended guardrail and behaves as expected. As a policy library grows, checking every change manually can slow the work and make it harder to explore alternative definitions with confidence. 

At Arinco, the Intelligent Co-Ops practice, our Microsoft cloud managed services team, is using our previous consultant, Jesse Loudon’s, agent testing framework to exercise policy changes during development. The framework is built on Microsoft Foundry, an enterprise AI platform for building, testing and governing AI applications and agents. It supports Arinco’s policy catalogue for Managed Services customers, and pairing it with Copilot assisted policy authoring is helping the team move through policy ideas faster and deliver them more consistently. The value is not that an agent replaces engineering judgement. It is that feedback arrives sooner, making disciplined iteration practical at scale. 

Azure Policy testing needs a faster feedback loop

Policy as code brings repeatability to how governance is authored and managed. It does not automatically make validation quick. A policy definition can be syntactically sound and still need careful behavioural testing against the situations it is intended to govern. 

When a policy library expands, this creates a familiar tension. The team wants to explore more policy options, but each option needs a reliable way to check its behaviour. If each test requires a bespoke manual process, feedback becomes a bottleneck. Engineers may reduce the number of variations they consider or spend time repeating checks that could be made more systematic. 

Agent-based testing offers a way to make that loop more repeatable. Microsoft’s AzurePolicyAgents project describes a workflow that connects policy changes, GitHub Actions and Azure AI Foundry agents. The agent can help generate policy test scenarios and validate policy behaviour. During an Arinco hackathon, our team forked and extended Microsoft’s reference implementation. Co-Ops is now applying that framework to its policy development work.

From Microsoft’s implementation to a Co-Ops development tool

The implementation Co-Ops is using builds on Microsoft’s AzurePolicyAgents reference implementation, which our team forked and extended into an MVP during an Arinco hackathon. The Microsoft repository provides the project overview and getting started guide.

The reference implementation shows the basic shape of the approach: a policy change enters a workflow, policy definitions are deployed and checked, and a Foundry agent generates and runs test scenarios by creating real Azure resources in a sandbox. It then reports whether the expected behaviour was observed. The precise setup and supported policy effects depend on the implementation and its current version, so teams should consult the repository before adopting its examples.

This is a conceptual view of the development loop, not a deployment specification. The useful shift is that testing becomes part of the normal change cycle. Instead of waiting until a large batch of policy work is ready, developers can use test feedback while the policy is still being shaped. 

How Co-Ops is using the framework

The current use is practical and focused: Co-Ops is rapidly testing policy work during development as it contributes to a catalogue of Arinco’s Opinionated policy for Managed Services customers. The framework helps the team enumerate policy possibilities, try changes, and see their effects without treating every experiment as a one off exercise. 

A typical development cycle can be thought of in a few steps: 

  1. Describe the intended guardrail. The engineer starts with the outcome the policy should enforce, including the compliant and non compliant situations that matter. 
  2. Author and review the definition. Copilot can assist with policy authoring, while the engineer remains responsible for checking the definition, its parameters, and the intent it expresses. 
  3. Run development tests through CI. The Foundry based framework provides a repeatable way to exercise policy changes and return evidence for review. 
  4. Use the results to refine the work. If a test exposes an unexpected outcome or a missing scenario, the author can adjust the policy or expand the cases and run the loop again. 

 

The benefit is especially visible when iterating across a family of policy options. Rather than manually rebuilding a validation process for each variation, the team can use the same testing approach repeatedly. That makes it easier to compare alternatives, discover useful edge cases and keep moving while the policy library grows. 

Enumeration also changes the economics of discussion. A team can write down two plausible interpretations, test both, and compare the observed behaviour while the policy is still easy to change. That makes policy review more concrete: reviewers can respond to an observable result instead of debating only what a definition might do. The framework does not decide which interpretation is right, but it can help surface that decision earlier. 

This is not a claim that every possible resource shape or policy outcome is covered automatically. Test breadth depends on the scenarios being exercised, the implementation’s capabilities and the quality of the review. The framework makes iteration faster; engineering judgement still determines whether the evidence is sufficient. 

Copilot authoring and agent testing work better together

Copilot assisted policy authoring and agent-based testing address different parts of the same development problem. Authoring assistance can help produce or adjust a definition. Testing helps the team check what that definition does. When used together, one can increase the pace of drafting and the other can support a consistent way to examine the result. 

That pairing is helping Co-Ops increase both velocity and consistency. Velocity comes from shortening the distance between a policy idea and useful feedback. Consistency comes from using a repeatable testing approach across changes, rather than relying solely on individual memory or bespoke manual checks. 

The distinction is important. Generated policy content is not automatically correct, and an agent generated test is not automatically complete. The engineer should check that the policy reflects the intended control, that the tests represent meaningful cases, and that the results make sense in context. Copilot and Foundry agents support the work; they do not own the policy decision. 

Microsoft’s current documentation for evaluating AI agents reinforces a related principle: evaluations help establish performance expectations and provide evidence for review. That documentation focuses on agent evaluation, while AzurePolicyAgents is the more direct reference for applying Foundry agents to Azure Policy testing. 

Faster iteration still needs sound engineering practice

Automation is most useful when the team is clear about what it does and does not prove. A successful test run is evidence about the scenarios exercised, not a blanket guarantee that a policy is suitable for every assignment or workload. 

For a strong policy development loop, keep these practices in view: 

  • Make intent explicit. Write down what the policy is meant to allow, audit or prevent before refining its definition. 
  • Review generated content. Treat Copilot assisted authoring as a starting point for engineering review, not as an approval step. 
  • Test representative cases. Include the relevant compliant and non-compliant scenarios and extend the set when a result reveals a gap. 
  • Inspect the evidence. Review what the workflow tested and how it reached its result before relying on the outcome. 
  • Keep ownership with the team. A policy change should still have a responsible human reviewer who understands its scope and effect. 

 

These guardrails let automation serve the quality process instead of becoming a substitute for it. They also make test results more useful to the next person reviewing a policy change. 

Conclusion: governance and engineers still matter

For Co-Ops, the immediate value is a quicker, more consistent way to test policy work while the policy catalogue continues to grow. Our hackathon team’s adaptation of Microsoft’s Foundry-based approach provides a practical starting point for CI testing, while Copilot-assisted authoring helps the team move through policy definitions with less friction.

Azure Policy testing with Foundry agents does not replace governance or engineers. It makes development easier to repeat: author, test, review and refine, then go again with smaller changes that are easier to understand and approve. Engineers are critical to that loop, bringing the domain knowledge and context needed to assess policies and their results.

If you would like to know more about how AI-assisted engineering could help your teams or environments, we would welcome a conversation about building faster feedback loops while maintaining the review and evidence that good governance depends on.

Get started on the right path to cloud success today. Our Crew are standing by to answer your questions and get you up and running.