Study guide

4.4 Custom Roles, Overprivileged Access, Backup & IaC Security

Microsoft Certified: Cloud and AI Security Engineer Associate SC-500

Track your progress as you read

Finished sections get a check mark.

1 Introduction & Exam Overview

1.1 Current Exam Facts 1.2 Skills Measured & Weightings 1.3 Study Path, Prerequisites & Exam Strategy

2 Microsoft Entra ID Secure Access

2.1 Privileged Identity Management (PIM) 2.2 Conditional Access Policies 2.3 MFA and Passwordless Authentication 2.4 Application Identities, OAuth Consent & Managed Identities

3 Azure Key Vault Secrets and Keys

3.1 Deploy and Configure Key Vault 3.2 Access Control and Firewall for Key Vault 3.3 Keys, Secrets, Certificates & Defender for Key Vault

4 Governance, Policy & RBAC

4.1 Azure Policy for Security Controls 4.2 Defender for Cloud Compliance & Security Standards 4.3 Resource Locks and Azure RBAC 4.4 Custom Roles, Overprivileged Access, Backup & IaC Security

5 Secure Storage Accounts

5.1 Storage Account Security Fundamentals 5.2 Storage Firewalls and Access Policies 5.3 Defender for Storage

6 Secure Databases

6.1 Azure SQL Platform Security 6.2 Database Auditing 6.3 Defender for Databases

7 Network Security Groups & Virtual Network Manager

7.1 Network Security Groups and Application Security Groups 7.2 Azure Virtual Network Manager Security Admin Rules 7.3 Virtual WAN and VPN Security

8 Private Access, Private Link & Azure Firewall

8.1 Microsoft Entra Private Access 8.2 Private Endpoints and Private Link 8.3 Azure Firewall 8.4 Network Watcher Diagnostics and Effective Rules

9 Security for AI Workloads

9.1 Purview DSPM for AI and Data Overexposure 9.2 Copilot Studio Protection and Agent Management 9.3 Microsoft Entra Agent ID Security 9.4 Defender for AI, Foundry Guardrails & AI Gateway

10 Secure Servers and Virtual Machines

10.1 Disk Encryption 10.2 Azure Bastion and JIT VM Access 10.3 Azure Arc and Defender for Servers 10.4 Trusted Launch, VM Security Features & Machine Configuration

11 Application Platform Security

11.1 Containers: AKS, ACR, ACI, Container Apps & Defender for Containers 11.2 Azure Functions and Logic Apps Security 11.3 Azure App Service Security 11.4 Web Application Firewall and API Management Protection

12 Defender for Cloud Security Posture

12.1 Defender CSPM and Secure Score 12.2 Workload Protection Plans and Multicloud Connectors 12.3 Vulnerability Management and Defender EASM

13 Microsoft Sentinel Activity and Event Collection

13.1 Workspaces, Roles & Content Hub 13.2 Data Connectors, Syslog/CEF & Windows Event Collection 13.3 Custom Tables, Retention & Purview Audit 13.4 Automation Rules and Playbooks

14 Microsoft Security Copilot & Final Review

14.1 Microsoft Security Copilot Workspaces and Roles 14.2 Plugins and Security Agents 14.3 Final Review and Exam-Day Strategy

4.4 Custom Roles, Overprivileged Access, Backup & IaC Security

Key Takeaways Explain This Topic AI

Custom Azure roles define Actions/NotActions/DataActions for Azure Resource Manager scopes; custom Microsoft Entra roles define directory permissions—do not mix the two planes.

Least privilege means preferring built-in job roles, narrowing scope, using PIM for standing admin, and removing wildcards and Owner where unnecessary.

Evaluate overprivileged access by reviewing role assignments at each scope, group nesting, classic admins, and unused privileged assignments—not only by counting Owners.

Azure Backup security features include soft delete (recover deleted backups), immutability on vaults, and multi-user authorization (MUA) with Resource Guard for critical operations.

Secure IaC (Bicep/ARM/Terraform) with policy-as-code, secure parameters/secret references (Key Vault), no plaintext secrets in templates/state, and least-privilege deployment identities.

Last updated: July 2026

4.4 Custom Roles, Overprivileged Access, Backup & IaC Security

Quick Answer: Create custom Azure roles only when built-ins are too broad or too narrow for ARM resource actions; create custom Entra roles only for directory tasks. Continuously hunt overprivileged Owner/Contributor and wildcard assignments. Protect Recovery Services / Backup vaults with soft delete , immutability , and multi-user authorization (MUA) . Ship infrastructure with Bicep/ARM/Terraform using policy , secure parameters , and secrets outside templates .

Custom Azure roles vs custom Microsoft Entra roles

Dimension Custom Azure RBAC role Custom Microsoft Entra role

Plane Azure resources (subscriptions, RGs, resources) Microsoft Entra directory (users, groups, apps, CA, etc.)

Definition Actions , NotActions , DataActions , NotDataActions , assignable scopes Entra permission sets / resource actions in the directory

  • Assignment UI Subscription/RG Access control (IAM) Entra Roles and administrators
  • Example “Start/stop VMs in RG-app only” “Create app registrations but not manage users”

Exam fail Using Entra role to grant storage blob data access Using Azure role to grant User Administrator rights

Authoring a custom Azure role (security engineer view)

Start from the closest built-in role JSON.

Trim to required Actions / DataActions ; avoid * unless break-glass.

Use NotActions carefully—they subtract from Actions but are easy to misunderstand; explicit allow lists are clearer when possible.

Set assignable scopes to the management groups/subscriptions where the role may be used—do not make every custom role tenant-wide without need.

Test with a pilot identity; verify both positive access and that denied actions still fail.

Prefer PIM-eligible assignment for any privileged custom role.

Scenario: Ops needs to restart App Service plans and read logs but must not change networking or assign roles. A custom role with Microsoft.Web restart/read actions at the app RG is better than Contributor on the subscription.

Custom Entra roles (brief, in-scope)

SC-500 mentions managing custom roles including Azure roles and Microsoft Entra roles . For Entra customs:

Use when built-in directory roles (Application Administrator, Groups Administrator, etc.) are too wide.

Still subject to Privileged Identity Management , Conditional Access , and access reviews.

Never substitute an Entra custom role for Azure Key Vault secret get permissions—that is the wrong plane.

Least privilege and overprivileged access

Least privilege: grant the minimum role at the minimum scope for the minimum time.

Evaluating overprivileged assignments (exam + real life)

Signal Why it is risky Remediation

Many Owners on subscriptions Full control + role assignment Reduce to PIM-eligible Owners; use Contributor + UAA separation

Contributor at subscription for all developers Lateral movement, resource wipe Scope to RG; split network/data roles

  • Wildcard custom roles ( Actions: * ) Hidden Owner-equivalent Rewrite with explicit actions
  • Standing User Access Administrator Persistent ability to escalate PIM + approval + MFA
  • Guest users with Owner External takeover risk Remove; use B2B least privilege

Service principals with Owner for CI/CD Pipeline token = cloud admin Federated credentials, narrow RG scope, OIDC

Classic subscription admins (legacy) Bypass modern RBAC thinking Convert to RBAC roles

How to review:

Inventory role assignments at MG, subscription, RG, and resource scopes (Azure Resource Graph / IAM downloads / access reviews).

Expand group membership (nested groups hide Owners).

Check Azure AD / Entra privileged roles that can elevate into Azure (for example Global Admin elevating access to manage all Azure subscriptions).

Correlate with PIM candidate roles still permanently active.

Fix by removing , replacing with narrower roles , lowering scope , or converting to eligible PIM assignments.

Defender for Cloud / identity recommendations and Microsoft Entra access reviews are allies here; governance is not only Policy.

Azure Backup security features

Backups are a prime ransomware target: attackers delete vaults, purge recovery points, or disable protection. SC-500 expects security controls on backup—not merely “enable backup.”

Soft delete

Soft delete retains deleted backup items (and, with modern secure-by-default behavior, strengthens vault-level protection) for a retention window so you can undelete after accidental or malicious deletion.

Topic Details to remember

Default retention Commonly 14 days (configurable upward, often up to 180 days depending on soft-delete capabilities)

Cost First 14 days typically no extra soft-delete charge for vaulted backups; longer retention incurs backup charges

Secure by default Soft delete increasingly enforced/always-on for Recovery Services vaults so operators cannot casually disable the safety net

  • Recovery Restore soft-deleted items back to a protected/retained state, then resume backup
  • Immutability

Immutable vaults prevent operations that would destroy recovery guarantees—such as removing backups or reducing retention in ways that erase recovery points before policy expiry. Once immutability is locked/enforced per vault capabilities, even privileged administrators cannot “quietly” shrink protection to sabotage recovery.

Use immutability for high-value workloads and regulated data. Plan carefully: operational flexibility drops by design.

Multi-user authorization (MUA) and Resource Guard

MUA adds a second approver boundary for critical backup operations using a Resource Guard typically in a separate subscription or security admin boundary:

  • Disabling soft delete / security features
  • Stopping protection with delete
  • Changing MUA itself
  • Other critical vault operations Microsoft protects with MUA

Roles such as Backup MUA Admin (manage Resource Guard) and Backup MUA Operator (perform guarded operations with authorization) appear in Azure built-in roles. Pattern: backup operators work daily in the workload subscription; security team owns Resource Guard elsewhere so a single compromised admin cannot both delete backups and disable defenses.

Other backup security reminders

Use private endpoints / restricted network access to vaults where architecture allows.

Encrypt with customer-managed keys when policy requires; protect those keys with Key Vault purge protection (chapter 3).

Soft delete and immutability complement resource locks but are not identical—locks protect ARM resources; backup soft delete protects recovery data lifecycle .

Hybrid MARS/MABS/DPM scenarios have additional security PIN and critical-operation notifications; cloud VM backup focuses on vault soft delete/immutability/MUA.

Infrastructure as code (IaC) security

SC-500 explicitly includes implementing security controls by using infrastructure as code . IaC is how guardrails scale with deployments.

Tooling surface

Tool Notes

Bicep / ARM Native Azure Resource Manager; first-class for Azure Policy, role assignments, locks, diagnostic settings

  • Terraform Multicloud; watch state file secrets , provider auth, and azurerm role/policy resources
  • Templates in CI/CD Treat pipelines as privileged production paths
  • Secure IaC practices for the exam

No secrets in templates or repos — use Key Vault references, GitHub OIDC / Azure DevOps federated credentials, pipeline secret stores; never commit storage keys or client secrets.

Secure parameters — mark secure parameters in ARM/Bicep ( secure() ); avoid echoing secrets in deployment logs/outputs.

Policy as code — deploy Azure Policy assignments/initiatives from the same pipelines that deploy landing zones; fail PRs that introduce public endpoints or missing encryption.

What-if / plan before apply — review destructive changes; require approvals for prod.

Least-privilege deployment identity — deployment service principal gets only the roles needed at the target scope (often scoped Contributor + specialized roles, not tenant Owner).

Deploy locks, diagnostic settings, Private Link, and CMK options in the template so environments are born compliant (pair with Deny policies for defense in depth).

Terraform state — remote state in Azure Storage with encryption, RBAC, soft delete, and no public access; state can contain sensitive values.

Deployment stacks / deny assignments — when using stacks to manage resources, understand platform deny assignments that protect managed resources from unauthorized deletion outside the stack.

Scenario: A pipeline deploys a Key Vault and App Service. The Bicep module enables RBAC permission model, purge protection, private endpoint, and diagnostic settings; secrets are set in a post-deploy step using a managed identity that has only Secrets Officer on that vault. A Policy Deny blocks any later manual portal change that re-enables public network access.

Tying the governance chapter together

  • Control Primary purpose
  • Azure Policy Enforce configuration
  • Defender standards Measure & prioritize compliance
  • Locks Prevent delete/modify accidents
  • RBAC + custom roles + PIM Who can act, least privilege
  • Backup soft delete / immutability / MUA Survive ransomware against backups
  • IaC Repeatable secure deployments
  • Exam traps

Building a custom Entra role when the need is Azure data-plane access (or vice versa).

Using custom roles with * “for convenience.”

Disabling backup soft delete to “clean up faster” without MUA/security review.

Storing Terraform state or parameter files with secrets in a public storage container.

Assuming resource locks alone provide backup immutability.

If you can design least-privilege roles, prove who is overprivileged, harden vaults against malicious purge, and ship secure templates, you have closed the SC-500 governance skill area.