M365Con 2027 – free online conference · 11–22 Jan 2027 · 120 sessions→ m365con.net

2026-07-11 · Season 2

Compliance as Code: The Architect’s Blueprint for Automated Trust

Compliance as Code: The Architect’s Blueprint for Automated Trust
Compliance is often treated as a documentation exercise—something organizations prepare for audits rather than embed into their daily operations. In this episode, we challenge that mindset by exploring the concept of Compliance as Code and why modern enterprises must shift from manual governance to…

Show notes

Compliance has traditionally been treated as documentation. Policies live in PDFs, access reviews sit in spreadsheets, and governance depends on people remembering to follow processes. But cloud environments evolve every minute, making manual compliance impossible to maintain at enterprise scale. In this episode of the M365 FM Podcast, host Mirko Peters explores why the future of governance isn't more paperwork—it's Compliance as Code. This episode provides a complete architectural blueprint for building automated trust across Microsoft Azure and Microsoft 365 using Azure Policy, RBAC, Microsoft Entra ID Governance, Privileged Identity Management (PIM), Managed Identities, Azure Key Vault, Microsoft Purview, Infrastructure as Code, and Zero Trust principles. Rather than slowing developers down with manual approval processes, you'll learn how modern cloud platforms embed governance directly into infrastructure, allowing organizations to move faster while improving security and auditability. WHY MANUAL GOVERNANCE ALWAYS FAILS Traditional governance simply cannot keep pace with cloud deployment velocity. Developers deploy infrastructure within minutes while governance processes often require days of manual approvals. This gap creates configuration drift, excessive permissions, shadow IT, and security risks that remain invisible until an audit or security incident exposes them. The episode explains why compliance documents don't create compliance—automated enforcement does. Topics include:

  • Configuration drift
  • Shadow IT
  • Manual approvals
  • Audit readiness
  • Governance debt
  • Cloud compliance
  • Security posture
  • Continuous validation
  • Automation
  • Infrastructure governance

RBAC VS AZURE POLICY: THE FOUNDATION OF MODERN GOVERNANCE One of the most misunderstood concepts in Azure governance is the relationship between RBAC and Azure Policy. RBAC answers one question: "Who is allowed to perform an action?" Azure Policy answers a completely different question: "What resources are allowed to exist?" The episode explains why confusing these two technologies creates fragile governance models that appear secure but fail in production. You'll learn how authorization and compliance work together to create layered security rather than overlapping controls. BUILDING THE GOVERNANCE STACK Modern governance isn't a single tool—it's an integrated architecture. The discussion walks through the complete governance stack, combining identity management, authorization, policy enforcement, monitoring, and continuous compliance into one cohesive platform. Key technologies include:

  • Microsoft Entra ID Governance
  • Azure RBAC
  • Azure Policy
  • Resource Locks
  • Azure Monitor
  • Log Analytics
  • Management Groups
  • Landing Zones
  • Policy Initiatives
  • Continuous Compliance

Each layer solves a different governance challenge while working together to reduce operational risk. MANAGED IDENTITIES, KEY VAULT & ZERO TRUST One of the biggest security risks in modern cloud environments is long-lived credentials. The episode explores why Service Principals with client secrets are becoming obsolete and how Managed Identities eliminate entire categories of credential management problems. You'll discover how Azure Key Vault becomes the trust anchor for enterprise architectures by combining secret management, hardware-backed encryption, RBAC authorization, private endpoints, automated rotation, and policy enforcement. The discussion also explains why Zero Trust is no longer just a security framework—it is the operating model that governs every workload, identity, API, and deployment throughout the cloud platform. POLICY AS CODE & CONTINUOUS COMPLIANCE Compliance should never depend on someone logging into the Azure Portal. Instead, governance itself becomes version-controlled code managed through Git repositories, pull requests, CI/CD pipelines, automated testing, and Infrastructure as Code. The episode covers:

  • Policy as Code
  • Infrastructure as Code
  • Azure Policy
  • Bicep
  • Terraform
  • Git-based governance
  • Automated remediation
  • Drift detection
  • Deployment pipelines
  • Version-controlled compliance

Rather than discovering configuration problems during quarterly audits, organizations continuously validate every deployment before it reaches production. DEVELOPER SELF-SERVICE WITHOUT LOSING CONTROL Many organizations believe developer productivity and governance are competing priorities. This episode challenges that assumption. Instead of slowing development with manual approval gates, platform engineering introduces "golden paths" where the easiest deployment path is also the most secure and compliant. Developers gain self-service infrastructure while Azure Policy, Infrastructure as Code, and automated pipelines enforce organizational standards behind the scenes. The result is faster delivery, lower operational risk, and significantly reduced governance overhead. PURVIEW, ENTRA & THE FUTURE OF COMPLIANCE Modern compliance extends beyond infrastructure. The conversation explores how Microsoft Purview and Azure Policy complement each other by governing both infrastructure configuration and sensitive data. You'll learn why organizations should design infrastructure governance, identity governance, and data governance together rather than treating them as isolated security projects. The episode also examines Microsoft's continued evolution toward continuous compliance, automated evidence generation, workload identity governance, and AI-assisted governance models that continuously validate cloud environments. WHO SHOULD LISTEN? This episode is ideal for:

  • Cloud Architects
  • Azure Architects
  • Security Architects
  • Platform Engineers
  • DevOps Engineers
  • Infrastructure Engineers
  • Compliance Officers
  • IT Decision Makers
  • Microsoft MVPs
  • Enterprise Architects
  • Anyone responsible for Azure governance

Whether you're implementing Azure Policy, building Landing Zones, adopting Microsoft Entra ID Governance, securing workloads with Managed Identities, modernizing RBAC, or preparing your organization for continuous compliance, this episode provides a practical roadmap for building governance that scales with modern cloud platforms. If you want to replace manual compliance with automated trust and understand how Microsoft's cloud governance ecosystem fits together—from identity and infrastructure to policy, security, and continuous compliance—this episode delivers a comprehensive blueprint for designing secure, scalable, and future-ready enterprise environments. Become a supporter of this podcast: https://www.spreaker.com/podcast/m365-fm-microsoft-365-azure-cloud-power-platform-ai--6704921/support.

Apple Podcasts · Spotify · YouTube · YouTube Music · Deezer

Host: Mirko Peters

Guests

Related articles

Transcript

Read the full transcript

Your compliance program has a document, probably several, a policy PDF someone approved 18 months ago, a quarterly access review that lives in a spreadsheet, a change advisory board that meets on Thursdays and moves at the speed of bureaucracy, and somewhere in your environment right now. A storage account is public, a service principle with tenant-wide graph permissions hasn't been rotated in two years, and a developer spun up a resource last Tuesday that violates six standards you care about. Nobody flagged it, the audit won't catch it until Q3. That's not a tools problem, that's a model problem. You're running a manual governance process in an automated world, the gap between governance speed and deployment speed. That gap is exactly where breaches live. It's where drift accumulates, it's where your next audit finding is already being written. Most teams treat developer speed and security control as a trade-off. Move fast or stay secure. Pick one, that framing is wrong, and it's costing organizations enormous amounts of time, money and exposure. What we're covering today, dismantles that assumption completely. In the next 100 minutes, you're getting the full architectural blueprint for making compliance, automatic, auditable and developer friendly. At the same time, as your policy, our back at scale, managed identities, key vault, and variety governance were going deep on all of it. If you're not subscribed, do that now. This is the kind of content we build for architects and security engineers who want the real technical depth, not the surface level overview. Let's get into it. Why manual governance always fails? The old model looks like this. A developer needs access, they open a ticket, the ticket goes to an approver. The approver is busy, three days later the access is granted, probably at a higher permission level than needed, it's faster to give contributor than to figure out the exact right scope. The developer finishes the project, the access stays, nobody removes it. Multiply that by 200 developers, 40 subscriptions and 18 months of project churn. What you get isn't a governance program, it's the appearance of one. This is the structural failure at the heart of manual governance. Humans are the bottleneck, the single point of failure, and the source of inconsistency, all at once. Change advisory boards were designed for a world where deployments happened weekly, and infrastructure changed slowly. In that world, a human reviewing every change made sense. But in a world where a CI/CD pipeline can deploy infrastructure in four minutes, the math doesn't work anymore. Governance speed is measured in days, deployment speed is measured in minutes, that gap doesn't just create friction, it creates risk. When governance can't keep up with deployment, teams root around it, they find exceptions, they create shadow IT, they grant themselves standing access because waiting for approval breaks their sprint. Every workaround is a small act of pragmatism that in aggregate produces an environment nobody fully understands. The real cost shows up in three places. Configuration drift, resources that were compliant at deployment and drifted into non-compliance over months with no one noticing. Shadow IT workloads and integrations that exist completely outside the governance perimeter because the govern path was too slow to be usable and often service principles. Application identities with broad permissions that outlived their projects, sitting undetected in your tenant with secrets that haven't rotated in years. Here's the number that should stop you cold. According to research across large organizations, nearly half have suffered a Microsoft 365 Security or Compliance Incident caused by misconfiguration, not sophisticated attacks, not nation state threat actors, misconfiguration. The environment drifted from the intended state, nobody courted, and eventually someone exploited it or an auditor founded. This is the audit theater problem. Policies exist on paper, they're reviewed annually, they're signed and filed, but they're never technically enforced. A policy that lives only in a document is not a control, it's a wish. And here's the insight that reframes the entire conversation. The problem isn't that people are careless, most security teams are deeply committed and most developers genuinely want to do the right thing. The problem is that manual systems structurally cannot scale. When you depend on humans to catch every misconfiguration, review every access request and enforce every standard. You've already lost, not because of bad intentions, because of physics. There aren't enough hours enough reviewers or enough attention cycles to keep pace with modern deployment velocity. The answer isn't more humans in the loop, the answer is removing humans from the enforcement loop entirely and putting them where they actually add value in the design of the system that enforces itself. That's what compliance as code is. And it starts with understanding a distinction most architects get wrong. The foundational confusion, RBAC versus policy. Here is the architectural mistake I see in almost every Azure environment I review. The security team wants to stop developers from deploying public storage accounts, so they tighten the RBAC model. They strip permissions, they remove the contributor role from specific groups, and they think the problem is solved. Three weeks later, someone with the right role assignment deploys a public storage account anyway, because RBAC never governed that, RBAC never could. This is the foundational confusion. RBAC and Azure policy are not substitutes for each other. They don't overlap, they answer completely different questions. And conflating them is how you end up with a governance model that looks great on paper, but fails in production. RBAC answers one question, who can act? It is identity-centric authorization. You are assigning a principle, a user, a group, or a managed identity. Permission to perform actions on resources. When you give someone the contributor role on a subscription, you are saying this identity is authorized to create and delete resources in this scope, that is it. RBAC draws the boundary around what identities are allowed to do. Azure policy answers a completely different question. What is allowed to exist? It is resource-centric enforcement. You are defining the state your environment must conform to. And the policy engine evaluates every resource against that definition at deployment time and continuously afterward. When you assign a policy that denies storage accounts with public network access, you are saying this configuration is not permitted. Regardless of who is asking, notice what that means, a user with contributor rights, fully authorized by RBAC, can attempt to deploy a public storage account. RBAC said yes to that user, but policy says no to that resource. The deployment fails. It fails not because the user lacked permission, but because the resource configuration violated the defined state. This is the layered model. RBAC governs the actor, policy governs the environment. One without the other leaves you exposed in ways you won't see until something breaks. There is a default behavior difference here that matters for your architecture. RBAC defaults to deny. If you haven't explicitly granted a permission, the answer is no. That is why least privilege RBAC is achievable. You are working from a closed system and opening specific doors. Azure policy defaults to allow. If you haven't explicitly restricted something, any compliant deployment goes through, that is why most environments drift because the absence of a policy isn't a guardrail. It's an open field. Understanding that difference changes how you design governance. RBAC titans what identities can do. Policy titans what the environment can contain. You need both moving in the same direction. Applied at the right layers. Serving their distinct purposes. Where does this get complex in the real world? Key Vault is the clearest example. Microsoft's current guidance is explicit. Use Azure RBAC for key vault data plane authorization, not legacy access policies. That is an RBAC decision controlling which identities can read secrets or manage keys. But whether a key vault is allowed to exist without soft delete enabled or without private endpoints, that is a policy decision. The identity governance and the resource governance work at different layers on the same service. Organizations that try to solve resource problems with RBAC end up with roles brawl. They create complex custom roles trying to prevent specific configurations when what they actually needed was a policy definition. And organizations that try to replace access control with policy end up confused when policy doesn't stop an authorized user from doing something they shouldn't. The mental model that clears this up, RBAC is the authorization layer for the actor, policies the compliance layer for the environment, neither replaces the other, together they form the two fundamental axes of Azure governance. And everything we build on top of them depends on keeping that distinction clear. Once you have that foundation, you can start thinking about governance as a system with structure and that structure has a specific shape. The governance stack layers that actually work. So you have separated the two tools, RBAC for the actor, policy for the environment. Now the question is how they fit into a broader architecture. Because neither one operates in isolation, governance at scale isn't a single control, it is a stack and each layer in that stack answers a different question that the layer above it can't. Start at the bottom, identity governance, who are the principles in your environment, how did they get their access and is that access still appropriate? This is EntraID governance territory, life cycle workflows, access reviews. It is the layer that keeps the identity model coherent over time even as people join, move and leave. Above that sits authorization RBAC. The layer that defines what each principle is permitted to do at what scope and under what conditions. This layer translates the identity model into actual permissions across your Azure estate. Above that sits policy guardrails, Azure policy. The layer that defines what the environment is allowed to contain independent of who is asking. This is where you enforce configuration standards and security baselines at the resource level. Above that sit resource locks, an narrower tool. But critical for protecting foundational infrastructure from accidental deletion, your hub network, your central logging workspace, your key vault in production. Locks aren't governance for everything. They are a last line of defense for the things that can't be recreated from a pipeline in a hurry and sitting across all of it is monitoring, not as a final step, but as a continuous thread running through every layer. Because a governance stack without observability is just hope with better documentation, each layer handles something the others can't. Identity governance can't prevent a misconfigured storage account. Policy can't recertify access that is no longer needed. RBAC can't tell you when your key vault configuration drifts from baseline, the power is in the combination, a system where each layer covers the gaps the others leave. The structural foundation that makes the stack coherent is the management group hierarchy. Management groups are how Azure lets you apply governance at scale without repeating yourself. You define your policy assignments and RBAC baselines once at the right scope, and they cascade down to every subscription in that hierarchy. The policy assigned at the root management group applies everywhere, a policy assigned to the production management group applies to every production subscription. You build the structure once and it shapes everything below it. This is where the landing zone concept becomes operational. A landing zone isn't just a subscription template, it is a pre-wired governance environment. When a new project subscription gets created inside a well-designed landing zone, it already has the right policy initiatives assigned and the right RBAC baseline in place. Governance isn't retrofitted after the fact. It is present from the first deployment, that distinction. Governance designed in versus governance bolted on has a real operational cost. Organizations that try to retrofit governance into an existing environment spend three to five times more effort than those who design it in from the start. You aren't just adding controls, you are fighting existing configurations, cleaning up drift and negotiating exceptions for things that should never have been permitted in the first place. The principle that ties this altogether is the paved road. When the compliant path is also the easiest path, developers don't need to think about governance. They just use the tools in front of them and the platform handles the rest. The friction that normally drives shadow IT and work around disappears. Not because you remove the standards, but because you made following them the path of least resistance. Everything we cover from here builds on this stack. Azure Policy is the enforcement engine at the Policy Guard Rails layer. Our back at scale governs the authorization layer. Managed identities are how workload identities operate inside this model without credentials that escape the perimeter. And EntraID governance is what keeps the identity layer coherent as the environment evolves. Three pillars, one architecture. Let's go deep on the first one. What Azure Policy actually does? Azure Policy isn't a firewall, it isn't a permission boundary. Think of it as a continuous evaluation engine, a referee that watches every single resource in your environment, it compares what it sees against your rules and when something doesn't match, it takes action. The model works like this. A policy definition is just a JSON document describing two things, the condition to check and the effect to apply. The condition can be almost anything, a resource type, a tag, or a specific configuration setting. The effect is what happens when a resource breaks the rule. This is where the strategy lives. You'll work with five main effects and each one has a specific job in your governance life cycle. Ordered is the lightest touch. It marks non-compliant resources in your dashboard but it doesn't block anything. This is your visibility layer. You use order when you need to see what's actually running before you start enforcing rules against it. Deny is the enforcement effect. If a resource violates a deny policy, it simply doesn't get created. The deployment fails at the arm layer before the resource ever exists. This turns a standard into a guardrail. But it also creates major incidents if you don't understand your blast radius first. Modify and append are your mutation effects. Modify changes a resource property during creation. Like automatically enabling diagnostic settings or forcing a specific tag value, append adds fields to a resource without changing what's already there. These are perfect when you want resources to follow a standard without blocking deployments over a missing tag. Deploy if not exists is the most powerful tool in the kit. When a resource is created and a related piece is missing, this effect triggers a new deployment to build it. For example, every storage account needs a diagnostic setting pointing to your log analytics workspace. Deploy if not exists, handles that automatically. So your developers don't have to remember it. The policy engine stops being an observer and starts being an active participant. Managing these one by one gets messy fast. That's why we use initiatives. An initiative or a policy set is just a collection of policies grouped into one assignable object. Instead of assigning 30 separate rules to a management group, you assign one initiative. This is how you make frameworks like ISO 27001 or NIST manageable. Microsoft provides built-in initiatives for CIS benchmarks, PCI DSS and HIPAA. You assign the initiative and every policy inside it activates across that scope at once. The scope hierarchy gives policy its reach. You can assign a policy at the tenant root and it cascades to every single subscription in your entire Azure estate. You can also target a specific management group, a subscription or just one resource group. Inheritance flows down. A policy at the root applies everywhere unless you explicitly exempt a resource. This inheritance is why your management group structure is so important. You set the assignment once at the right level and the hierarchy does the rest of the work for you. There is one more piece, the compliance dashboard. This is your live view of how well your environment follows your rules. It shows you percentages and non-compliant resources in real time. But here's the problem. Looking at a dashboard isn't a compliance program. It's just a signal. What you do with that signal is the actual work of governance. The dashboard tells you where you are but your remediation pipeline determines where you stay. Safe deployment. How to roll out policy without breaking production. Most organizations break production the same way. They spend weeks designing deny policies. They feel good about the coverage. They assign the initiative to the root management group. Flip enforcement on and go home. By morning, deployment pipelines are failing everywhere. Critical workloads can't scale. The security team is stuck on calls explaining why nothing is working. This isn't a guess. It's the most common failure pattern in enterprises, you know. And it's avoidable if you realize the deployment strategy matters as much as the policy design. The model that fixes this is thinking in rings. Picture your Azure estate as a series of circles. The outer rings are your low risk areas. Sandboxes and dev subscriptions. The inner rings are your production systems and regulated workloads. Safe deployment always moves from the outside in. You prove the policy in the outer rings before you ever let it touch production. But even before that, you start with enforcement mode disabled. This is a setting that tells the engine to scan resources without blocking anything. You get full visibility into what the policy would catch. But there are no consequences for the developers. Think of it as running in read only mode. You aren't flying blind. You're building a map before you start closing roads. This makes what if analysis your best tool before enforcement goes live, run compliance scans to model the blast radius. You need to know how many resources are non-compliant right now. You need to know which subscriptions are hit hardest. Answering these questions while enforcement is disabled costs you nothing. Answering them after a deny policy, fires in production costs you trust. The audit first principle is the rule here. Every policy that will eventually deny must start its life as an audit policy, not for a day, but for weeks. You need to see what it surfaces across your target scope. You'll find configuration patterns you didn't expect. You'll find legacy workloads that were grandfathered in, but never formally exempted. None of that complexity is visible until you run the policy in audit mode long enough to find it. The actual progression follows three phases. Audit, then modify, then deny. Audit gives you the visibility you need. Modify or deploy, if not exists, brings existing resources into compliance automatically. This shrinks the non-compliant population before you ever turn on the block switch. By the time you flip to deny, you've already fixed most of the violations. The blast radius is tiny because you've been systematically reducing it for weeks. Ring-based rollout makes this official across your hierarchy. Non-production management groups get the assignment first, then you move to pre-production, then to low-impact production. And finally, your most sensitive environments. At every transition, you run a compliance scan and a health check, you aren't guessing, you're measuring. The part most teams miss is that the technical work is only half the job. Communication matters just as much as the Jason. When denied policies go live, developers need to know what changed and how to fix it. A policy that blocks the deployment without context is just friction. But a policy that tells a developer exactly how to be compliant is a guardrail. That difference comes down to how you write your messages and how you prepare your teams. Policy rollout isn't a switch you flip. It's a deliberate, staged operation, policy as code, managing governance like software. Every organization is serious about as your governance eventually hits the same wall. You design the policies, you stage the rollout. Everything looks perfect. Then, six months later, someone logs into the portal. They tweak an assignment. They add an exemption without telling anyone. They change a parameter in a policy definition. And nobody knows. There is no record of who changed it. There is no way to test if the change was right. There is no way to roll it back when things break. Managing policy through the portal is a governance anti-pattern. It creates an environment that is impossible to audit, impossible to reproduce, and impossible to test. When your configuration lives in the portal, it exists in only one place. It exists in a state only the portal understands. Changed by whoever had the permissions and the urge to click around. That isn't infrastructure. That's improvisation. The shift that changes this is treating your governance exactly like application code. You use version control. You use peer reviews. You test every change before it goes live. You deploy through automated pipelines. This is policy as code. It turns governance from a manual task into an engineering discipline. The model starts and gets. Every policy definition lives in a repository. Every initiative and every assignment, including the parameters and the scope. Is a code artifact with a full history? Every exemption becomes a pull request with a reviewer, a justification and an expiration date written into the code. When an auditor asks what policies were active on a specific date, you don't check the portal. You check the git log. The pipeline for policy mirrors how you deploy software. A developer proposes a change, automated checks, run, syntax validation and unit tests, security and platform teams review the code. The pipeline deploys to a test group first, where integration tests prove the policy works. Once it passes. The change moves through your rings, from test to pre-production to production. No human touches the portal. The pipeline is the only way in. Bicep and Terraform are the two main ways to do this. Bicep is the native choice. It's built for Azure Resource Manager and works great if you stay within the Microsoft Stack. Terraform offers more flexibility for multi-cloud setups. And its state management makes it easier to see when things drift. But the tool matters less than the discipline. You aren't optimizing for syntax. You are optimizing for the audit trail, the repeatability. And the testing that only code provides, structure also matters. A single, massive repo for every policy becomes a mess as you grow. The model that scales is separate repositories for different domains. You have one for security baselines, one for cost, and one for regulatory compliance. Central templates live in a platform repo and get pulled in by the others. This keeps teams accountable for their own policies while keeping the process consistent. The real benefit here isn't just technical. When changes require pull requests, they require human review in the right context. A reviewer isn't guessing at a portal click. They are looking at a diff that shows exactly what changed and why. Every change is discussed, documented and traceable. The entire program becomes clear to everyone who needs to see it. Policy as code is how you make a stage deployment model last for years. Instead of just months, the RBIG drift problem. RBIG drift is dangerous because it looks like nothing is wrong. There is no alert, there is no failed deployment. There are no errors in your pipeline. The environment keeps running, workloads keep deploying, but underneath, the gap between your design and your reality gets wider. It happens quietly, consistently and invisibly. It stays hidden until an incident or an audit forces you to look at it. Here is how it starts, a project kicks off and needs a subscription fast. Someone gives three people owner rights because it's the easiest path and the work starts Monday. The project ends four months later. Two of those people move to different teams, but the permissions stay. Nobody removes them because nobody owns the cleanup. Now, multiply that by the emergency access granted during an outage. The contractor who got a direct assignment because there wasn't time for a group. The developer who needed contributor for one week. Six months ago, each choice was defensible at the time, but together, they create a permission model that looks nothing like the original plan. This is the slow identity drift problem. It is different from a misconfiguration you can catch with a policy. It doesn't announce itself, it doesn't trigger a compliance check. It just accumulates, assignment by assignment, until you find thousands of roles that nobody can explain. The cause is structural. RBIG was designed as a permission system. It was built to answer one question. Does this person have the right to do this action right now? It was not designed to govern itself. There is no expiration on a role. There is no built-in ownership. There is no automatic cleanup when a project ends without identity governance on top of our back, the model decays by default. And drift isn't just a headache. It is a direct security hole. Overprivileged accounts are the primary way cloud breaches happen. If an account with contributor rights is compromised, the attacker can steal data or change security settings instantly. The blast radius is limited only by what that role allows. The more drift you have, the bigger that radius becomes. There is a simple way to see this. Count your direct user assignments versus your group assignments in one subscription. Direct assignments are the fingerprints of drift. They show access granted outside of a controlled process, given to a person instead of a group, and likely never reviewed in a well-governed environment. Direct assignments are rare. In a drifting environment, they are everywhere. That count tells you the truth. It shows how much of your access is actually governed and how much is just there. Permissions held by people who don't need them in roles that are too broad at scopes that were never meant to be permanent. The solution isn't more audits. Auditing drift after it happens is expensive and reactive. The solution is architectural. You have to build RBAC in a way that makes drift structurally difficult to create in the first place. Designing RBAC that doesn't drift. Your RBAC model wasn't designed for scale. It was designed for convenience. Direct assignments, custom roles, ad hoc permissions. And the assumption that you can manage users one by one. That assumption is broken. Because at scale, work doesn't start with the user. It starts with the group. The fix starts with a rule that people violate constantly. You never assign RBAC directly to a person. You always assign it to enter ID security groups. This isn't just a preference or a tip for when you have time. It is a non-negotiable rule for your architecture. But here's the problem. When you link a role to a person, the permission moves with them. When they leave, the permission stays until someone remembers to delete it. That's where things change. When you assign a role to a group, the assignment stays stable. It doesn't matter who joins or leaves the company. The group membership changes, but the permission boundary stays exactly where you put it. So what's actually happening is you've separated the permission from the human life cycle. You manage the group through identity workflows and access reviews. You have a govern surface. But when you scatter direct assignments across hundreds of subscriptions, you have drift. Your governance is only as strong as your group management. If nobody reviews who is in the group, you've just moved the problem up one level. The group first model only works if the groups themselves are clean. You need access packages. You need approval workflows. You need membership to expire. The RBAC stays steady while the identity model underneath stays sharp and one level deeper. We have to talk about role design. Use built-in roles. Resist the urge to make custom ones. Every custom role you create is a debt you have to pay later. As your ads, new resource types all the time and your custom roles won't update themselves. When someone sees storage blob data contributor, they know what it does. When they see app team brought deploy custom V3, they have to go read the code. Built-in roles are documented and maintained by Microsoft. If you must use a custom role, treat it like code, version it, review it, document why it exists. Then there is the issue of scope. The old model says to assign permissions as close to the resource as possible. It feels safer, but in reality, it does the opposite. In a large environment, resource level assignments multiply until nobody can audit them. If you have 50 subscriptions and thousands of resources, you'll end up with a mess of fine grained permissions that are impossible to track. The new model is different. You assign at the highest level that makes sense like the subscription or resource group, then you use as your policy to restrict what people can actually do. You get simplicity at the permission layer and precision at the governance layer. Keep your numbers low. You should have no more than three owners per subscription. Keep high impact roles under 10 per scope. These aren't just random numbers. They represent the limit of what a human can actually understand during an incident. Beyond that, your access model is wider than your team's ability to manage it. Platform teams need different rights than app teams. Security needs to see everything but touch nothing. When you build these distinctions into the design from day one, everyone has exactly what they need. If you give everyone one broad role because it's easier, you're trading a little bit of time today for a massive security hole tomorrow. Blueprints and policy initiatives handle different parts of this. Blueprints set the baseline when you create an environment. Policy initiatives handle the compliance every day after that. One governs day zero, the other governs the rest of the timeline. Well designed, RBAC doesn't drift because the structure doesn't allow it, but even the best design needs a way to stay honest. PIM. Just in time access as a governance model. A clean RBAC model is a great start, but even a perfect setup has a flaw. It's the default behavior of Azure. When you make someone a permanent owner, that power is live 24 hours a day. It's there while they sleep. It's there on the weekend. If that account is hacked on a Sunday afternoon, the attacker doesn't have to work for it. The door is already open. This is the standing access problem. Most environments were built on the idea of permanent assignments. Zero trust rejects that the window of privilege should be measured in hours, not months. That is why we use privileged identity management or PIM. PIM changes the model. It creates a gap between being eligible and being active. An active assignment is always on. An eligible assignment is dormant. The user has permission to hold the role, but they don't actually have the power until they ask for it. When they activate it, the clock starts. When the time is up, the power vanishes automatically. Think about what this does to your attack surface. If a hacker steals credentials for a permanent owner, they win immediately. But if they steal credentials for an eligible PIM user, they get an account that has to ask for permission. They still have to pass MFA. They have to give a reason. They might have to wait for an admin to click approve. All of that creates noise. It gives you time to catch them. The blast radius is suddenly much smaller. You tune the controls based on the risk. MFA is the bare minimum for every activation. The justification field creates an audit trail that explains why the work is happening. For the big roles like global admin or subscription owner, you require a second person to approve the request. If an owner activation expires in two hours, that is a much lower risk than an assignment that lasts forever. PIM needs to cover two layers. You manage your Azure resource roles like contributor and owner. But you also manage your directory roles like global admin. Both layers need to follow the same JIT model. And there is a technical shift you need to see. PIM iteration two beta APIs are retiring on October 28, 2026. If you have scripts or pipelines using those old endpoints, they will break. You have to move to the PIM iteration three GA APIs. This isn't a suggestion and it won't happen on its own. If you haven't checked your automation lately, do it now. The deadline is real. Access reviews finish the cycle. PIM handles the moment someone needs power. Access reviews handle whether they should even be on the list. Every quarter you should look at who is eligible for these roles. If someone changed projects or left the team, you pull their eligibility. PIM controls the activation. Access reviews control the roster. Together they make sure that privileged access stays under control. Not just when you set it up, but every single day. If this changed how you think about governance, follow me, Mirko Peters on LinkedIn. The service principle crisis. PIM handles how humans get access. But there is a second identity problem in most Azure and M365 environments that works completely outside that model. And it is growing quietly in the background of almost every tenant I have ever looked at. Open your enter ID app registrations right now. Not the ones your platform team documented. All of them. Look for names like Project X integration test or Data Pipeline 10 2022 or Graph App do not delete. And count how many have client secrets. Then check how many of those secrets were last rotated more than 12 months ago. Then see how many of those app registrations actually have an owner listed. What you find in that exercise is the service principle crisis. It is not just one vulnerability. It is a population of them dozens or hundreds of application identities with permissions that made sense once. But they are just sitting in your tenant long after the original project died. The life cycle that creates this is predictable. A developer needs to connect to Microsoft Graph for a project. They create an app registration, generate a secret and grant the permissions the integration needs. Sometimes they scope it carefully, but other times they just grant tenant-wide mail. Read because that was the example in the documentation. The integration goes live six months later the project changes a year later the project ends. But the app registration stays the secret is still valid. The permissions are still active and because that developer moved to a different team. Nobody owns it. Nobody monitors the sign-ins and nobody asks if this identity should even exist. A service principle with tenant-wide permissions and a two-year-old secret will not show up as a critical alert on your dashboard. But that is exactly what it is an attacker who finds that secret in a leaked config file or a misconfigured repository inherits those permissions instantly. There is no MFA challenge. There is no approval workflow. There is no time limit. The credential works and the permissions are live. The ordered question that shows the scale of this is very specific. How many service principles in your tenant have no owner, no sign-in activity in the last 90 days, but still have permissions to read mailboxes or user data? In most environments, the answer is uncomfortable. It is not one or two. It is many. Each one is a loaded credential sitting in your environment owned by nobody and governed by nothing. The root cause is structural. Static credentials require humans to stay secure. Someone has to remember to rotate the secret. Someone has to delete the registration when the project ends. Someone has to notice when permissions are too broad and tighten them. Humans are not good at maintenance tasks that have no immediate penalty for failing. Rotation gets pushed back. Decommissioning gets forgotten. Scope reduction never happens because the integration works and nobody wants to risk breaking it. Static credentials escape your control by design. They get copied into configuration files. They end up in code repositories. They get pasted into pipeline variables by developers who do not know a better way. The credential leaves your controlled environment the moment it is created and from that point on you have no visibility into where it lives or who has it. You cannot audit your way out of this. The shift has to be architectural. You have to stop trusting the credential and start trusting the identity. When the question moves from is this secret valid or two, does this workload identity have permission? The entire attack surface changes. That shift is what managed identities are for. And why they are the only real answer to a crisis most companies have not named yet. Managed identities, how the trust model works. Managed identities are platform-issued workload identities. That phrase matters. Platform-issued means as your creates the identity, as your manages the credential and as your handles the rotation. The developer never generates a secret. They never store one. They never schedule a rotation task. They never accidentally paste a password into a config file. The entire mess of credential management simply disappears. Here is how it works. When you enable a managed identity on a resource like a function app or a virtual machine, enter ID registers that resource as an identity. It gets an object ID in your directory just like a user. You can assign our back roles to it. You can granted graph permissions. You can scope its access to exactly what it needs. The big difference is that the credential for that identity never leaves the Azure platform. When the workload needs to call another service like Key Vault or a SQL database, it calls a local metadata endpoint. The platform returns a short-lived token that is cryptographically signed and scoped to that specific task. The workload uses that token to log in, the token expires, the next call gets a fresh one. There is no password in the configuration and no certificate on the file system. There is no rotation process that fails because someone forgot to run a script. There are two types and the difference matters for governance. A system assigned managed identity is tied to one resource. If you delete the resource, the identity disappears automatically. That is a massive governance win. You do not need a separate process to clean up the identity because the infrastructure lifecycle handles it for you. A user assigned managed identity is different. You create it as a stand-alone resource and attach it to your compute. It can be shared across multiple resources, which helps reduce sprawl, but it does not die when the resource dies. It requires actual ownership and a plan to delete it when it is no longer needed. The trust model shift here is worth slowing down on. In the old service principle model, the question was, is this credential valid? If the secret matched, you were in. The credential was the proof. In the managed identity model, the question is, does this workload identity have permission at the scope? The platform verifies the identity when the token is issued. The RBIAC model decides what that identity can do. The token is the proof, and it is short-lived, unforgeable, and tied to a specific resource. This shift has real results. Organizations that move from secrets to managed identities see about a 95% reduction in the time spent managing credentials. That is not a small number. It represents the end of an entire category of work. You no longer have to generate secrets, distribute them securely, or monitor them for expiry. Managed identities make that work unnecessary. The developer experience is also much better. The Azure Identity SDK uses a class called default Azure Credential that handles the tokens for you. When a developer works locally, it uses their CLI login. In a pipeline, it uses the pipeline identity. In production, it uses the managed identity. The same code runs in all three places without changing any credential settings. The authentication just adapts to the environment. Developers stop thinking about credentials because the platform handles that layer. For zero trust, this is how you actually verify explicitly at the workload layer. Every single call between services is authenticated through EntraID with a verifiable short-lived token. There is no implicit trust based on where the server is sitting. There are no shared secrets that make it hard to tell who did what. The identity is clear, the permissions are explicit, and every event is logged in your sign in activity where you can audit it. Governing managed identities, where trust can break. Your security team probably thinks the problem is solved. They moved from service principles to managed identities. They stopped worrying about secrets, and they're right about half of the problem. But that half truth is exactly where your security program stalls. Managed identities fix the credential problem. They do not fix the authorization problem. The risk doesn't just vanish. It moves, and it moves somewhere less visible, which makes it much more dangerous. Here is how the attack actually works. If a workload is compromised, maybe through a code floor or a container escape, the attacker is already inside. They don't need to steal a password. They just call the Azure metadata service. The service sees the request coming from the right place and hands over a valid token. The attacker isn't stealing an identity. They are the identity. They inherit every single permission you gave that workload. If that identity has contributor rights on a subscription. The attacker now owns that subscription. The blast radius is defined by your choices. It's defined by how you scope that identity on day one. This is the IAM Trust Gap. The token system is working perfectly. The problem is the permissions on the other side of that token. Overprivileged managed identities are just the service principle crisis in a different shape. The only way to control this is through environment scoping. One identity, one lifecycle stage. You need a specific identity for dev, a different one for test, and a separate one for production. You can never share them if a dev environment gets hit. It should never be able to touch production. But if you use the same identity for both, that wall doesn't exist. Your architectural boundary is just a drawing. It isn't a control. You have to apply the same discipline here that you use for human users. Assign permissions at the resource level. Or the resource group level. Giving a managed identity access to a whole subscription should require a written reason. It isn't always wrong, but it expands the blast radius to everything. That needs to be a conscious choice. Not a lazy default. Every user assigned identity needs an owner, a purpose, and a plan for when it dies. Without those, you're just recreating the mess of often service principles. System assigned identities clean up after themselves. User assigned ones do not. An old identity sitting in production with active permissions is a ticking bomb. It's an often credential that doesn't show up on a secret audit. You have to use Azure Policy to keep this under control at scale. Set up policies that require managed identities for every resource that supports them. Block people from using client secrets when a managed identity is an option. Audit every identity that's missing an owner tag. Flag every subscription level permission for a manual review. These aren't tasks for a quarterly meeting. These are continuous checks running against every resource you own. You catch the mistake at deployment. Before it becomes govern instead, the trust model changed. It didn't go away. Govning it means treating workloads like people. They must be scoped, documented, and enforced by the same policy engine that runs the rest of your world. Key Vault as a compliance control point. Most people call Key Vault a secret store. That's technically true, but it's also a massive understatement. In a modern architecture, Key Vault is your trust anchor. It's the one place where secrets and policy meet. It's where your identity model finally connects to your data protection. Key Vault does more than just hold onto passwords. It gives you a single, audited path to every secret in your estate. It gives you HSM backed keys for workloads that need high-level hardware security. That's the kind of thing auditors look for in PCI or healthcare environments. It handles auto rotation, which finally kills the manual processes that nobody ever actually did. But the real value is the regulatory alignment. Azure Policy has definitions that map directly to ISO 27001 and NIST standards. You don't have to build the evidence manually. You assign the policy. And the compliance data starts generating itself. But there is a shift happening right now that you cannot ignore. The old access policy model is a liability. It uses a flat list of permissions that doesn't talk to the rest of Azure R-BAC. It creates islands of access that your central team can't see or audit. The standard is now R-BAC based authorization. You should be using policy to deny any vault that still uses the old model. For existing vaults, the path to migrate is already there. This isn't a suggestion for next year. It's the baseline for right now. If you're running a production vault, secure isn't a vague goal. It's a list of settings. Soft delete must be on with a 90-day window. Perge protection must be enabled. This stops even an admin from wiping data during that 90-day period. Without it, soft delete is just a recovery tool. Not a security control. Public access has to be off. You use private endpoints only. And your logs need to go to a central log analytics workspace. Don't send them to a storage account where they'll be forgotten. Send them where your alerts actually fire. Every one of these settings can be enforced by Azure Policy. You deny vaults without soft delete. You deploy diagnostic settings automatically. You audit for public access. You require private endpoints. This is the difference between a PDF of security standards and a guardrail. The policy turns a written rule into a technical reality. And just like identities, environment separation is mandatory. A dev vault and a production vault are not the same thing. They hold different secrets. They have different risks. If you share a vault across stages, you've collapsed your isolation boundary. It's the same mistake as sharing an identity. One vault per environment governed by the same baseline with separate permissions for each. When your vaults are consistent, the whole architecture becomes trustworthy. Identities get secrets without passwords. Pipelines get certificates without touching them. Auditors get clear logs without any gaps. Key vault stops being a box for secrets. It becomes the point where you actually govern access. Key vault in CICD, secrets without exposure. You've set up your vault. It's secure. It has policies. But a vault that nobody uses correctly is just a well-governed place where secrets sit before they get mishandled somewhere else. The real test for your architecture happens inside your deployment pipelines. That's where secrets have always been most exposed. And that's where the combination of managed identities and key vault either closes the loop or leaves a massive gap. The rule here is simple. Secrets must never live in code, configuration files, or pipeline variables. This isn't a suggestion. It's an architectural constraint with zero exceptions. Every time a secret appears as a pipeline variable, it leaves a trail. It gets logged. It shows up in build outputs that get archived. It exists in configuration stores that anyone with pipeline access can read. The attack surface of a secret in a pipeline variable isn't just the pipeline itself. It's every system that pipeline touches, every log that gets shipped and every person who has ever looked at the configuration. The surface is much larger than it looks. The managed identity model fixes this by removing the human from the path. Here is how the flow actually works. Your pipeline agent runs under a managed identity. This applies whether you use an Azure DevOps agent, a GitHub actions runner, or a task in a fabric pipeline. When the deployment needs a secret, the agent calls key vault using its identity token. It grabs the secret at runtime and uses it for the task. The value never appears in an artifact. It never shows up in a log. It never sits in a config file. The secret moves directly from the vault into memory for the duration of the operation. It doesn't rest anywhere. A human can read it. And it doesn't stay behind once the task is finished. We see this clearly in the Microsoft fabric pattern. Many organizations run fabric pipelines with secrets buried in notebook code or connection strings. They are carrying a risk that managed identities were specifically designed to fix. The fix is a direct sequence. First, you inventory every pipeline and notebook that holds a credential. Then you enable managed identity for those fabric resources. You move every secret into key vault and grant the resource the key vault secrets user role. Make sure you scope this to specific secrets rather than the whole vault. Once that's done, you delete the embedded credentials. The pipeline still works exactly the same way but the credential handling has changed completely. This same logic applies to graph API integrations. If you use client certificates, store them in key vault. Do not put them in your app settings file or your pipeline variables. Configure your pipeline to fetch that certificate at runtime using the agent's identity. Now, your application authenticates to graph using a certificate from a governed, audited vault. Every access event is logged that is a much stronger position than having a certificate sitting in a config file that gets bundled into a deployment package. Static analysis is the guardrail that catches mistakes before they reach the vault. Automated credential scanning tools look at code diffs for patterns that look like secrets or API keys. This happens as a gate before any merge. It isn't a manual review. It's an automated check that fails the pipeline the moment a secret is detected. The developer gets feedback immediately. They see the error before the code enters the repo and before it becomes part of an archive. You can extend this to the infrastructure layer with policy validation. By using policy state evaluations inside the pipeline you ensure that infrastructure code follows your baseline. If a bicep template tries to create a vault without purge protection, the pipeline fails before it ever starts the deployment. The rules you defined in a zure policy are mirrored in the pre-deployment layer. Violations show up during development rather than during a compliance scan weeks later. The endstatus of pipeline where no engineer ever touches a credential. Every access is logged in diagnostics. Rotating a secret means changing it in one vault not hunting through 100 configs and repositories to find every place it was copied. Can security teams trust developer self-service? The question is simple. Can you give developers autonomy without creating the gaps that keep security teams awake at night? In most companies this never gets asked directly. Instead it gets answered by the length of the ticket queue. It gets answered by the shadow IT problem. It gets answered by the number of exceptions granted because the official path is too slow. The traditional answer is no. Security teams stay in control by being a bottleneck. Every request goes through them. Every service connection gets a review. Every production deployment needs a sign off. The logic sounds right. Humans prevent mistakes. But look at what actually happens. Developers find ways around the system. They create personal subscriptions. They reuse old service principles because waiting three weeks for a new one isn't an option. They store credentials in unmoneted places because the approved vault process takes longer than the entire sprint. The security team didn't lose control because developers were being difficult. They lost it because the friction made the insecure path faster than the secure one. The answer to the trust question isn't a yes or a no. It's a design choice. Trust isn't something you grant to a person. It's something you build into the platform. When the system enforces the standards when a bad resource can't be deployed because as your policy blocks it, the approval loop becomes unnecessary. The security team doesn't need to look at every deployment because the infrastructure already knows what they would have approved. This is the difference between guardrails and gates. A gate is a human decision that stops progress until someone says, "Okay, gates create queues, queues create pressure. pressure leads to exceptions and eventually those exceptions become the new normal." A guardrail is a system constraint. It prevents unsafe actions but lets everything else move forward without stopping. If a developer tries to deploy a storage account with public access the policy engine gives them an error immediately. Everything else deploys fine. There is no queue, there is no waiting. There is no exception because the violation was caught before it ever existed in the environment. Erster Digital is a great example of this model in action. They are a financial organization with over 40 development teams. They manage over a thousand terraform workspaces or running within guardrails enforced by the platform. Developers provision their own environments. They don't wait for tickets. The platform teams define the standards and build them into the modules and templates. The speed comes from removing the human from the approval path. The security comes from the fact that the platform won't let them break the rules even if they try. When you see a 70% reduction in onboarding time, it isn't just about the tools. It's about the organizational model. The bottleneck in a ticket system isn't the work itself. It's the handoff, it's the queue. It's the context switching for the person reading the request. When a developer can spin up a governed environment that already has the right networking and identity setup, the time collapses, the handoff simply disappears. For security leaders, this is a massive shift in your role. The question is no longer, did I approve this? The question is, did I design a system where unsafe deployments are impossible? The first question only scales as far as one person can read. The second question scales to every team the platform touches. One architect who builds a strong policy baseline has more impact than a whole team of people processing tickets. The leverage comes from the infrastructure, not from the approval chain. Security teams that haven't made this move are working harder than everyone else and they're getting worse results. The Golden Path. Building self-service that enforces standards. The guardrail's not Gates model tells you what to build toward. The Golden Path tells you how to build it, so developers actually use it. A Golden Path is a pre-approved, pre-configured workflow where the easiest way to deploy something is also the compliant way to deploy it. It isn't a restrictive tunnel that forces developers through a narrow experience. Think of it as a well-lit road with good signage and no potholes. One that happens to have barriers on the sides preventing anyone from driving off a cliff. The developers who use it aren't thinking about compliance. They're thinking about shipping. The compliance is happening underneath them, invisibly, by design. What a Golden Path actually contains isn't a single artifact. It's a layered package. You have IRC modules with security baselines already baked in. A network module might deploy with private endpoints configured by default, while a storage module enables encryption and disables public access before the developer writes a single parameter. A key vault module creates a vault with R-back authorization, purge protection, and diagnostic logging already wired. These aren't options the developer might enable if they remember to read the documentation. They are the defaults they'd have to deliberately override. Every module in the catalog encodes a standard. Using the module is how you meet the standard. Pipeline templates work the same way. The platform team publishes a deployment pipeline template that includes credential scanning as a pre-merge gate, policy validation before infrastructure deployment, and key vault secret retrieval via managed identity already configured. A developer who consumes that template gets all of those controls without implementing any of them. The compliance work happened when the platform team built the template. The developer benefits from it automatically. The delivery mechanism for these modules and templates is the internal developer portal. Backstage or an equivalent catalog surface that exposes Golden Paths as self-service actions developers can trigger directly. You can create a new microservice. Provision a dev environment, or register a new API. Each action maps to a pre-approved workflow that calls the right IAC module runs through the right pipeline template and produces an environment that's compliant from the first resource created. The portal makes the secure path discoverable and convenient. Convenience drives adoption more reliably than any policy mandate ever will. Roll-based boundaries define what self-service means at each level. Developers can provision anything within their landing zone. They can create resources, configure services, and deploy applications. What they can't do is escape the guardrails. And the guardrails aren't enforced by a person who might be in a meeting. They're enforced by Azure Policy at the management group level, which evaluates every deployment against the defined standards before resources are created. A developer who tries to deploy a resource configuration the Golden Path doesn't support against a specific actionable error at deployment time, not a ticket rejection three days later. The policy enforcement points in a well-designed Golden Path run at two distinct layers. IAC linter's catch violations during development. Before the pipeline even runs before any Azure API gets called, a developer who accidentally removes the purge protection parameter from a vault module sees a linting error in their editor or in the pull request check. The outer layer is Azure Policy at the management group level, which catches anything that made it past the linter and evaluates it against the same standards the linter was checking. These are two independent enforcement points, each serving a different part of the development cycle. Measuring whether the Golden Path is working requires metrics that reflect actual behavior, not activity. You want to see the percentage of deployments executed through platform pipelines versus ad hoc manual deployments. You should track the time from repository creation to the first working environment. You also need to look at the change failure rate for deployments through the standard path compared to deployments that bypassed it. These numbers tell you whether developers are choosing the Golden Path or rooting around it. And routing around it is the signal that the path itself needs attention, not that the developers need more restrictions. The cultural shift this requires from security teams is the hardest part of the transition and it's worth naming directly. The job changes from reviewing individual deployments to designing the system that makes individual reviews unnecessary. That shift requires relinquishing a form of visibility that felt like control in exchange for a structural model that produces better outcomes at scale. The teams that have made it don't want to go back. EntraID governance, the identity control plane, the Golden Path governs what developers can build, the policy engine governs what resources are allowed to exist, PM governs when privileged humans can act. But none of those mechanisms answer the question that sits underneath all of them. Who should have access to what right now? Given where they are in their role and their relationship with the organization. That question asked continuously, answered accurately and enforced automatically is what EntraID governance is built for. Most organizations treat EntraID governance as a feature set rather than an architectural layer. They turn on access reviews when an auditor asks for evidence of recertification. They configure a life cycle workflow when HR complains that offboarding takes too long. They use entitlement management for a specific application because someone read a blog post. These are isolated implementations of something that only delivers its full value when it operates as a coherent system. A control plane that sits above RBAC, above PM, and above every individual access decision. It determines whether the access model stays coherent as the organization changes around it. Four components work together to make that possible. Life cycle workflows automate the identity events that happen when someone joins, moves within, or leaves the organization. When a new developer joins a platform team, the workflow triggers automatically. Account creation, group membership assignment, and access package provisioning all happen without a ticket. When that developer moves to a different team three months later, the mover workflow removes the access that was relevant to the old role and provisions what the new role requires. So when they leave the organization, the lever workflow revokes everything. Group memberships, application access, and Azure RBAC entitlements. Before the end of their last day, the human life cycle drives the access model automatically. No manual cleanup queue. No, I'll get to it next week. No orphaned access sitting in the environment because the off-boarding ticket got lost. Entitlement management addresses a different problem. How do you make governed access "requestable" without making it ungoverned? Access packages bundle the things a person needs for a specific role or project. EntraID group memberships, application assignments, and Azure RBAC roles. Into a single, requestable unit with defined approval workflows, eligibility criteria, and automatic exploration. A developer who needs access to a production monitoring dashboard a specific key vault, and the relevant security group doesn't submit three separate tickets to three different teams. They request one access package from a self-service portal. An approver reviews the request against defined criteria. The access is granted with a built-in expiration. 90 days, six months, whatever the package policy defines. When it expires, it's gone unless the person requests renewal and the approver reauthorizes. Entitlement management makes access, requestable, and time-bound by default, not by exception. Access reviews are the ongoing re-certification mechanism that keeps the model honest. Every quarter, group owners, application owners, and role owners receive review tasks. They have to decide if this person still needs membership in this group, or if this RBAC assignment is still appropriate for this person's current role. They also have to determine if this access package assignment should be renewed. The review surface, the drift, that accumulates even in well-governed environments. People who changed roles but retained old access, assignments that were supposed to be temporary but never expired. An entitlements that made sense six months ago, but are now broader than necessary. The review process isn't just evidence generation for auditors. It's the cleanup mechanism that keeps the access model continuously calibrated rather than periodically corrected. Here's where most governance programs have a gap they haven't closed yet. Service principles and managed identities are identity actors in your tenant. They access resources, call APIs, read mailboxes, and write data. But they almost never appear in access review campaigns. The human identity governance model gets applied to users and groups, the workload identity population, which in most large tenants is larger and carries more sensitive permissions than the human population. Operates outside the governance life cycle entirely, including workload identities and access reviews, applying ownership requirements through the same entitlement management model and treating a managed identities role assignments with the same recertification rigor as a humans. That's the closure that transforms a partial identity governance program into a complete one. The trust model EntraID governance enables isn't a philosophy. It's an operational state. Access granted when needed, scope to what's required and removed when the need ends. For every identity in the tenant, human and workload alike, purview and azure policy, two control planes, one architecture, one of the most common architectural mistakes in Microsoft environments is treating purview and azure policy as competing tools. People often think they have to choose which one governs compliance. The confusion makes sense because both have dashboards, both use policy definitions and both spit out compliance reports. But in reality, they answer fundamentally different questions about different surfaces, conflating them creates gaps in exactly the places attackers and auditors look first, azure policy governs infrastructure state. The question it answers continuously is, are my resources configured the way I defined them? You use it to check if keywolds are using RBAC authorization or if storage accounts are encrypted with customer managed keys. It monitors if diagnostic logs flow to the right workspace and a virtual network's use private endpoints. Every resource in your estate is evaluated against these rules on an ongoing basis. Non-compliance triggers an audit finding, a remediation task, or a deployment block depending on your setup. azure policy doesn't care about the content moving through those resources. It only cares about the configuration of the resources themselves. Purview governs data behavior. The question it answers is different. Is sensitive data being handled the way my policies require? It looks for credit card numbers being emailed to external domains or files marked as highly confidential being copied to unmanaged devices. It checks if retention labels are applied to content that falls within a regulatory scope. Purview operates at the data layer by inspecting content and enforcing movement restrictions based on what the data is not where the infrastructure sits. It can't tell you if your key vault has purge protection enabled. Likewise, azure policy can't tell you if a SharePoint user just exfiltrated a document containing health records. The shared foundation underneath both is Microsoft EntraID. Every enforcement decision both tools make ties back to an identity. The RBAC assignments, azure policy evaluates are EntraID principles and the DLP policies purview enforcers are scoped to EntraID users, groups and devices. Classification labels applied by purview travel with content through the same identity-authenticated sessions that Entra governs. When you design these control planes together rather than independently that shared identity foundation becomes a coordination surface. It's the place where decisions made at the infrastructure layer and the data layer reinforce each other instead of operating in separate silos, where they intersect operationally is worth being specific about because that intersection has become more concrete recently? azure policy can enforce that azure rights management encryption is applied to specific workloads so that certain storage accounts or communication channels use RMS protected encryption. Purview endpoint DLP, as of the April 2026 rollout, can now classify those protected office documents and apply DLP policy actions to them directly on endpoints. That's a closed loop. azure policy defines the encryption requirement at the infrastructure layer while purview enforces data handling policy on the encrypted content that infrastructure produces. One control plane creates the governed environment, the other governs what happens inside it. The M365 compliance center integration with azure policy has moved in the same direction. azure policy's regulatory compliance initiatives now include M365 related control mappings. The A-Cat M365's third initiative definition in the public azure policy repository is evidence that Microsoft is actively bridging the gap between infrastructure reporting and M365 requirements. It's not a full architectural merge and you shouldn't design as if it is but the convergence is real and it's directional. The practical design principle is simple. Build your azure policy baseline and your purview DLP strategy in the same design session. Do not treat them as separate work streams owned by separate teams. The infrastructure decisions as your policy enforces directly shape the surface purview DLP operates against. This includes which services use RMS encryption which networks restrict data exfiltration parts and which logging configurations feed your correlation queries. Design them together and they amplify each other. Design them in isolation and you'll spend months discovering the gaps between them. Zero trust as the operating principle. Every architectural decision covered in this episode was made inside a framework. Policy enforcement, ABAC design, PM activation, managed identity scoping, key vault configuration, and enter ID governance all follow a specific logic. That framework isn't a product you buy or a vendor category you evaluate. It's an operating principle that determines how you reason about every governance decision before you make it. Zero trust is that principle. It matters here because it's the only model that makes compliance as code coherent rather than just technically sophisticated. The three principles are well known. Verify explicitly, use least privilege, and assume breach. What's less understood is what they mean when you translate them from a security philosophy into daily operational decisions across an Azure and M365 estate. Verify explicitly means trust is never inherited from context. A request coming from inside your vnet doesn't get trust just because it's inside your vnet. A workload running on a trusted VM doesn't get trust because the VM is trusted. Every access request carries its own authentication burden. For human access that means MFA, device compliance, and conditional access evaluation. For workload access it means managed identities authenticating through enter ID with short-lived, cryptographically signed tokens for every service to service call. The trust is verified at each hop. No call inherits permission from the previous one. The identity model is the control plane, not the network topology. Usually's privilege is the principle that shaped every scoping decision discussed in this episode. You apply our back assignments at the narrowest viable scope and target managed identity roles at specific resources rather than entire subscriptions. PM activation windows are measured in hours rather than weeks, and key vault secret access is granted to specific secrets rather than entire vaults. Entitlement management packages bundle exactly what a role requires and expire automatically. These privilege isn't a one-time configuration exercise. It's a continuous design pressure applied to every permission decision. It is resisted by convenience at every turn and only sustain through automation and ongoing review. Assume breach is the principle that changes how you think about the value of all the other controls. Don't design a governance architecture on the assumption that attackers won't get in. Design it on the assumption that they already have and then ask what can they reach from here. PM eliminates standing access so that a compromised account credential produces an eligible assignment instead of an active one. Environment scoped managed identities limit what an attacker can do with a compromised workloads token to the blast radius of that specific environment. Private endpoints and deny by default NSG rules mean that lateral movement inside a compromised network encounters real resistance rather than flat trust. Every layer is designed to contain damage. There are two developments worth naming that extend the zero trust model into territory. Most organizations haven't governed yet. The first is workload identity federation. Managed identities can now serve as federated credentials for entry applications across tenant boundaries. A workload in one tenant can authenticate to resources in another tenant using its managed identity as the credential. There are no shared secrets and no certificates pass between organizations. The trust relationship is expressed as an identity federation governed by Entra with every cross tenant authentication logged. This is cross tenant trust without the attack surface that shared credentials create. The second is the network layer which often gets ignored in identity heavy conversations. You need a hub and spoke topology with Azure Firewall in the hub and per application vNets with subnet level segmentation. NSG baselines should be set to deny by default with explicit allow rules scoped to the actual communication patterns each service requires. Use private endpoints for every pass service that supports them including Key Vault, Storage, SQL, and Service Bus. This removes those services from any public network exposure entirely. The network layer doesn't replace the identity layer. It reduces the blast radius when the identity layer is penetrated which assume breach tells you to plan for. Zero trust isn't a state you reach. It's a continuous posture. It is a direction you orient every architectural decision toward knowing you're never fully there but getting measurably close with each control you implement correctly. Azure Policy, PIM, Managed Identities, Key Vault, and EntraID governance are not just marketing materials. They are the technical implementation of that posture. They are built into the infrastructure itself and run continuously without waiting for a human to decide its time to check. Monitoring drift detection and continuous compliance. Your compliance dashboard is not a compliance program that distinction matters more than it sounds. Most organizations build an elaborate infrastructure just to generate reports that nobody looks at. They produce the data, they file it away, and then they wait for the next reporting cycle. A dashboard that refreshes once a day and gets reviewed once a quarter is just audit theater. It might have better graphics than a spreadsheet but it's still theater. The posture it shows you is a historical snapshot. It's a picture of a moment that has already passed. Your environment has drifted since that picture was taken. You just don't know where it happened yet. Continuous compliance means the system monitors itself. It means that when the environment deviates from the state you defined, it generates a signal automatically. Those signals flow into your alerting pipelines and then someone or something responds before that deviation turns into an actual incident. The monitoring architecture isn't a separate program you layer on top of your governance. It's built into the same infrastructure. It draws from the same sources. It runs the same continuous evaluation loop that your policies run against your resources. Three log sources form the backbone of a complete audit trail. First, you have enter a sign in logs. These capture every authentication event for both humans and workloads. They tell you which identity authenticated, where they came from, which resource they hit, and what the result was. Second, you have Key Vault diagnostic logs. These capture every data plane operation against your vaults. Every time a secret is read, a key is used or a certificate is retrieved, it's recorded here. It even tracks the failed attempts. Third, you have Azure Activity Logs. These tell the control plane stories. They show who created a resource, who modified a role assignment, and who deleted a vault. Each source answers a different layer of the governance question. But none of them can answer it alone. The value of connecting these logs becomes clear when you look at a real world scenario. Imagine a PIM activation happens at 2am on a Saturday. The enter sign in log records it. You see which account activated which role, the scope they targeted, and the justification they typed in. 30 minutes later, the Azure Activity Log shows a new role assignment on a production subscription. That assignment was made by the account that just activated. 20 minutes after that, the Key Vault diagnostic logs show a massive spike in secret reads. This is coming from an identity that doesn't normally touch that vault. In isolation, you could explain each of those events away. But together, they form a pattern that answers the one question regulators always ask. They want to know who had privileged access if they used it, what they touched, and if any of it was authorized. Correlation gives you that answer. SiloDlog Review just gives you fragments. The Entertainment Governance Preview moves this model into territory. Most companies haven't monitored before. It uses configuration as code for over 200 intra-resource types. This includes your conditional access policies, your authentication methods, and your external collaboration settings. Everything that defines how your identity plane behaves is captured as a baseline. The system scans for drift on a six-hour cycle. When your tenant configuration moves away from that defined state, you know about it within hours. You don't find out because in order to ask the question, you don't find out because an incident exposed the gap. You know, because the system is constantly comparing the current state to your codified baseline. It's the same principle as policy compliance scanning but it's applied to the identity control plane itself. Our back drift detection follows the same pattern for your role assignments. You should export your role assignments to get on a regular schedule. Doing this daily is practical but for high sensitivity subscriptions, hourly is better. If an assignment appears in the environment that doesn't have a match in your code, it triggers a review. This isn't a manual check. It's an automated comparison that flags the discrepancy and creates a remediation task. The code is the source of truth. Anything that doesn't match it is drift and drift requires an explanation before it can become the accepted state. The alert patterns that actually matter aren't the obvious ones. If a workload identity usually makes five reads an hour and suddenly makes five hundred, that's worth an alert. If a role is activated through PIM outside of business hours when it's never been used that way before, that's worth an alert. If a role assignment appears at a subscription scope and bypasses your standard workflow, that's worth an alert. These patterns don't require exotic logic. They just require you to know what normal looks like. You baseline the expected behavior, then you build alerts against the deviations. The governance architecture you've already built defines what is normal. The monitoring layer just watches for the moment things diverge. Because detection without response is just expensive logging. Remediation exceptions and the governance life cycle. Detection tells you something is wrong. What happens next is what matters. It determines whether your governance architecture actually holds or if it slowly dissolves into a collection of documented intentions and undocumented reality. You have to start with exceptions. This is where most governance programs quietly fail. The goal isn't to have zero exceptions that's impossible. Migrations need temporary access. Incident response needs permissions that aren't in the standard catalogue. Regulatory requirements create legitimate carve-outs. A governance model that can't handle exceptions isn't robust. It's brittle and brittle models always get bypassed by the people trying to do their jobs. The goal is to govern those exceptions so they don't turn into permanent drift. Every exception needs four things before it gets approved. First, it needs an owner who is personally accountable for it. Second, it needs a business justification that explains why the standard path doesn't work. Third, it needs a defined expiration date. And fourth, it needs a review condition that surfaces the exception for recertification. An exception without an expiration date isn't a managed exception. It's just a policy violation with paperwork attached to it. The paperwork doesn't make the environment safer. It just makes the risk feel official. PIM is the best mechanism for the most common type of exception which is temporary elevated access. Maybe a team needs subscription owner rights for 48 hours to finish a migration or an incident response team needs to see production logs outside their normal scope. In every case, PIM managed activation is the right model. It's time-bounded, it's MFA-gated, it's logged, and it expires automatically when the window closes. The access exists only for as long as it was justified. When that window shuts, the account goes back to being eligible only. Nobody has to remember to go back and revoke the permissions. For the drift that doesn't require a human decision, you use automated remediation. These are the configuration gaps that policy is already built to fix. Deploy? If not exists, policies are your primary tool here. If a resource is deployed and it's missing a required diagnostic setting, the policy detects the gap and deploys the setting for you. There is no ticket to open. There is no remediation queue to manage. There is no delay between finding the problem and fixing it. The modify effect works the same way for properties you can change after a resource is created. It can add a required tag, adjust a network rule, or update an encryption setting. The policy engine doesn't just report that there's a gap. It closes the gap. Some misconfigurations are more complex. They might require changes across multiple resources that a single policy can't handle. This is where the remediation pipeline pattern comes in. When a policy non-compliance event fires, an automated workflow picks it up. It executes a standardized bicep or terraform module against the resource because that module uses the same code that governs your initial deployments. The fixed state matches your baseline exactly. The fix is version controlled. The execution is locked. The audit trail connects the non-compliance event directly to the action that fixed it. That is exactly what regulators want to see when they ask how you handle drift. Access reviews are the final cleanup mechanism. They catch what automation can't reach. Quartly review cycles bring role assignments and entitlements to the surface. They find the PIM activation that was extended once and then forgotten. They find the access package for a project that ended four months ago. They find the group membership for someone who changed teams but kept their old permissions. The reviewers make the decision to remove the access. The process makes that decision visible and time-bounded. It stops being dependent on someone remembering to cleanup after themselves. The governance life cycle isn't a project you finish. You design the standards, you deploy the enforcement, you monitor for the deviations, you remediate the drift, you review what has accumulated, and then you evolve the standards as the environment changes. That cycle runs continuously. Each time you go through it, the environment gets closer to the state you defined. The gap between what your governance says and what actually exists gets a little smaller. That shrinking gap is the definition of compliance as code, working the way it was intended. The 2026 compliance automation roadmap, most organizations exist somewhere on a spectrum, on one end. You have policies written in word documents. They're enforced by calendar reminders. They're tested during annual audits that everyone dreads. On the other end, you have policies in Git, they're deployed through CI/CD pipelines. They're validated continuously. Audit evidence is generated automatically and drift is detected within hours. The distance between these two points isn't technical. It's a maturity journey. And knowing which phase your intels you exactly what to do next. Phase one is visibility and inventory because you can't govern what you can't see. This phase is about getting an accurate picture of your actual environment, not the environment from the architecture diagram you drew 18 months ago. But what exists right now? You need to know how many service principles are in your tenant. You need to see how many have no documented owner. You need to find the subscriptions with direct user role assignments instead of group assignments. How many key vaults still use legacy access policies? What resources are publicly accessible that shouldn't be? Audit mode policy assignments at scale answer these questions fast. You aren't enforcing anything yet. You're just building the baseline that every future decision depends on. Organizations that skip this phase and move straight to enforcement create incidents. But the organizations that finish it properly they know exactly where the enforcement will hurt before it ever goes live. Phase two is policy codification and enforcement. This is where the architecture we've discussed actually gets built. You take every security standard in your documentation and translate it into a policy definition. You move it into Git. You deploy it through a pipeline. Start every initiative in Audit mode to see what it catches. Fix your IRC modules so the compliant path is the default path. Move to deny on the controls once the environment is ready. This is when you build the golden paths. You establish the PIM activation policies. You migrate service principle authentication to manage the identities for every workload that can handle it. This phase takes longer than the first one. It requires coordination across platform, security and application teams. The Earth's the digital case we talked about is a phase two story. 40 teams and 1,000 terraform workspaces all brought under consistent guardrails through deliberate platform design, not through restriction, but through architecture. Phase three is continuous monitoring and reporting. This is where the governance architecture becomes self-sustaining. Drift detection runs on a six hour cycle. Correlation queries across intrasign in logs and key vault diagnostics produce alerts on the patterns that matter. Access reviews execute on schedule and feed removal decisions back into the identity plane automatically. Remediation pipelines close configuration gaps without human intervention. Audit evidence is generated continuously. Rather than being assembled under deadline pressure, in this phase compliance isn't something you check. It's something you operate, but two shifts are arriving faster than most road maps account for. First, purview's AI-powered regulatory templates reach general availability in August of 2026. They change the relationship between regulatory, text and technical controls. In the old model, a compliance team manually mapped a new regulation to a set of policy definitions over several months. In the new model, the system ingests the regulatory PDF and produces actionable control mappings automatically. The time between a new requirement appearing and a technical control being deployed compresses from months to days. That isn't just a small improvement. It restructures how compliance programs respond to change. The second wave is co-pilot governance. It's arriving whether you're ready for it or not. AI agents operating inside your M365 environment are identity actors. They authenticate via app registrations or managed identities. They access data, they call APIs, they read from exchange, they need the same governance treatment as every other identity in your tenant. That means scoped permissions, documented ownership, access reviews and policy enforcement. Organizations that govern AI agents with the same rigor they apply to humans will have a defensible posture when regulators ask questions. The ones treating AI agents as a separate category are accumulating a debt that compounds with every agent they deploy if you're making the case to leadership. Remember this. Compliance as code is not a security budget line. It's a delivery velocity investment. Governance that runs automatically doesn't slow developers down. It removes the friction that stops them while they wait for an approval skew to move. Audits stop being crises. They become routine evidence collection. The trade-off between moving fast and staying secure. Simply stops being a trade-off. Start with one management group, one initiative, one golden path, prove the model in a small scope, and then expand from demonstrated value. Governance stops being a checkpoint. It becomes the infrastructure itself. And that shift changes everything downstream. This week I want you to open one subscription, count your direct user, our back assignments, against your group assignments. That ratio tells you exactly how much drift you're already carrying. Before you've changed a single policy definition, if this changed how you think about compliance architecture, leave a review. It helps more people in the Microsoft ecosystem find this conversation. Connect with me, Mirko Peters. On LinkedIn, share what you found in that R-Back audit. It shapes what we cover next. In the next episode, we're looking at AI agents in your M365 environment. They're becoming the new governance surface most organizations haven't planned for yet. We're going deep on the identity layer.

← Power Apps Code Apps - Simply ExplainedMicrosoft Scout - Simply Explained →