Lesson 01 — Azure Resource Hierarchy

Domain 1 — Identity & Governance AZ-104: 20–25% ~25 min No prerequisites

Why You Need to Understand This First

Everything in Azure — every policy, every RBAC role assignment, every network peering rule, every cost allocation — lives somewhere in a five-level hierarchy. If you do not have this hierarchy internalised, you will spend your entire Azure career making scope mistakes: applying a policy too broadly, assigning a role at the wrong level, failing to understand why a resource is or is not visible from a given context.

In production, this hierarchy is your governance model. In the exam, every scenario that mentions access control, policy, or resource management will implicitly test whether you know where in this hierarchy the action should happen.

The Five-Level Hierarchy

Azure organises every resource into a strict containment model. Each level inherits from everything above it.

🏢 Tenant (Azure AD / Microsoft Entra) └─ 🗂️ Root Management Group └─ 🗂️ Child Management Group (e.g. "Corp", "Sandbox") └─ 🗂️ Child Management Group (e.g. "Prod", "Dev") └─ 📋 Subscription (e.g. "Prod-Payments") └─ 📁 Resource Group (e.g. "rg-payments-eastus") └─ ⚙️ Resource (VM, VNet, Storage Account, etc.)
Inheritance rule Policies and RBAC role assignments made at a higher scope automatically flow down to every child scope. A deny policy on the Root Management Group applies to every subscription in the entire tenant. This is the most important operational fact about this hierarchy.

Level 1 — The Tenant

A tenant is the top-level identity boundary in Azure. It maps 1:1 with a Microsoft Entra ID (formerly Azure Active Directory) instance. Every user, group, service principal, and managed identity lives in exactly one tenant.

ConceptWhat it means in practice
Tenant ID A GUID. This is what Azure uses internally to route all identity and access decisions. You'll often need it when configuring federation, API access, or external tools.
Home tenant vs. guest A user can be a member of one tenant but a guest (B2B) in many others. Their permissions are independent in each.
Global Administrator The most powerful role in the tenant. Can elevate to User Access Administrator at the root management group scope — effectively god mode over all subscriptions. Guard this role with your life.
Security posture In enterprise environments, Global Administrator accounts must use phishing-resistant MFA (passkeys or hardware FIDO2 tokens), be break-glass emergency accounts, and trigger real-time alerts on sign-in. Never use them for day-to-day work.

Level 2 — Management Groups

Management groups are purely a governance container. They hold subscriptions (and other management groups). They have no billing impact. Their only purpose is to apply Azure Policy and RBAC at scale, across many subscriptions at once.

Limits you must know for the exam

LimitValue
Max management group tree depth6 levels (beneath root)
Management groups per tenant10,000
Children per management groupNo published hard limit
Root management groupAlways 1, cannot be deleted, name = Tenant Root Group

Enterprise landing zone pattern

In real enterprise deployments, you will see a shallow hierarchy like this — never deep nesting:

Tenant Root Group ├─ Platform │ ├─ Management (Log Analytics, Defender, monitoring) │ ├─ Identity (Domain controllers, Entra Connect) │ └─ Connectivity (Hub VNet, Firewall, ExpressRoute) ├─ Landing Zones │ ├─ Corp (workloads needing corp network) │ └─ Online (internet-facing workloads) ├─ Sandbox (developer experimentation — no prod data) └─ Decommissioned (subscriptions being wound down)
Why keep it shallow? Each level of nesting multiplies policy inheritance complexity. Microsoft recommends no more than 3–4 levels beneath the root. The enterprise landing zone reference above is the Microsoft CAF standard.
Exam trap Management groups are for governance, not billing. Cost Management and budgets operate at the subscription level, not the management group level. Do not confuse the two.

Level 3 — Subscriptions

A subscription is the billing and scale unit in Azure. Every resource must live in exactly one subscription. Subscriptions have hard service limits — for example, 980 resource groups per subscription, or limits on vCPU quotas per region.

When to create a new subscription

This is a common architecture decision in enterprise environments:

ReasonExample
Isolation boundaryProduction vs. development — blast radius containment
Billing separationDifferent departments or cost centres billed independently
Service limit avoidanceA workload that would exceed vCPU quotas in a shared subscription
Regulatory boundaryWorkloads with PCI-DSS or HIPAA requirements need separate audit perimeters
Network isolationInternet-facing vs. corp-connected workloads need separate VNet topologies

Subscription types

TypeUse
Pay-As-You-GoDefault. Billed monthly at list prices.
Enterprise Agreement (EA)Large organisations. Volume discounts. Managed via EA portal.
Microsoft Customer Agreement (MCA)Modern replacement for EA. Billing profile-based.
Dev/TestDiscounted rates for non-production. Must not run production workloads.
Free Trial$200 credit for 30 days.

Level 4 — Resource Groups

A resource group is the fundamental unit of deployment and lifecycle management in Azure. Every resource must belong to exactly one resource group. Resource groups are not a security boundary — they are an organisational and lifecycle container.

Key facts

  • Resource groups have a location, but resources inside them can live in any Azure region — the resource group location only stores the metadata.
  • Deleting a resource group deletes all resources inside it immediately and irreversibly (subject to soft-delete policies on individual services).
  • RBAC applied at the resource group level is inherited by all resources inside it.
  • Azure Policy assignments at the resource group level only affect that resource group (no downward children, since resources have no children).
  • Resource groups cannot be nested.

Naming and grouping patterns

Enterprises use consistent naming conventions. Microsoft's Cloud Adoption Framework recommends a scheme like:

rg-<workload>-<environment>-<region>-<instance>
rg-payments-prod-eastus-001
rg-payments-dev-westus-001
rg-networking-shared-eastus-001
Grouping strategy Group resources by lifecycle, not by type. All components of a single application (VM, NIC, disk, NSG, public IP) belong in the same resource group so they can be deployed and deleted together as a unit. Putting "all VMs" in one resource group and "all storage accounts" in another is an antipattern — it makes lifecycle management painful.

Level 5 — Resources

A resource is any Azure service instance: a VM, a storage account, a virtual network, a key vault, a function app. Resources are identified by a resource ID, which encodes the entire hierarchy:

/subscriptions/{subscriptionId}
  /resourceGroups/{resourceGroupName}
  /providers/{resourceProvider}
  /{resourceType}/{resourceName}

Example — a virtual machine resource ID:

/subscriptions/a1b2c3d4-1234-5678-abcd-ef1234567890
  /resourceGroups/rg-payments-prod-eastus-001
  /providers/Microsoft.Compute
  /virtualMachines/vm-payapi-prod-001
Why resource IDs matter Resource IDs are used everywhere — in ARM/Bicep templates, Azure CLI commands, RBAC scope assignments, diagnostic settings, and Azure Policy definitions. You will be reading and writing them constantly. Get comfortable with the structure.

Resource providers

Resources belong to a resource provider (RP), which is the service namespace. Resource providers must be registered in a subscription before resources of that type can be created. Most common ones are auto-registered, but you may encounter this when using newer or less common services.

ProviderResources
Microsoft.ComputeVMs, disks, availability sets, scale sets
Microsoft.NetworkVNets, NSGs, load balancers, public IPs
Microsoft.StorageStorage accounts, blob containers, file shares
Microsoft.KeyVaultKey vaults, keys, secrets, certificates
Microsoft.InsightsMetric alerts, diagnostic settings, action groups

Scope: The Concept That Ties Everything Together

In Azure, scope is the specific point in the hierarchy where something is applied or measured. Scope is the answer to: "where does this permission/policy/budget take effect?"

ActionApplied at scopeInherits to
RBAC role assignmentMG / Subscription / RG / ResourceAll children below
Azure PolicyMG / Subscription / RGAll children below
Azure BudgetSubscription / RGN/A (reporting only)
Diagnostic settingsResourceN/A (per-resource)
Resource LockSubscription / RG / ResourceAll children below
TagsSubscription / RG / ResourceNot inherited (by default)
Tags do NOT inherit This is a common exam trap. If you tag a resource group, its child resources do not automatically carry that tag. To enforce tag inheritance, you need an Azure Policy with the Inherit a tag from the resource group if missing built-in effect. Remember this.
Deny overrides Allow — with one exception In RBAC, if you are denied by a deny assignment, no allow role can override it — except that the account that created the deny assignment is usually exempt. In Azure Policy, a Deny effect blocks a resource deployment regardless of what RBAC says. Know the interaction between these two systems.

Hands-On: Navigate the Hierarchy in the Portal

Open portal.azure.com and follow these steps to see the hierarchy in action. If you don't have a subscription yet, use the Microsoft Learn sandbox.

  1. Find your Tenant ID: Search for Microsoft Entra ID in the portal. The Overview blade shows your Tenant ID and your primary domain. Copy the Tenant ID — you'll use it in later lessons.
  2. Find Management Groups: Search for Management groups. If your tenant has never used them, you'll see only the Root Management Group. This is where you'll build the governance hierarchy in a real enterprise deployment.
  3. Inspect a Subscription: Search for Subscriptions. Click on a subscription and look at the left menu — notice how RBAC (Access Control IAM), Policies, and Budgets all appear here. These are the subscription-level scope actions.
  4. Inspect Resource Groups: Inside a subscription, browse Resource Groups. Click one. Notice the same left-menu pattern — Access Control (IAM), Policies — but now scoped to the resource group.
  5. Find a Resource ID: Inside a resource group, click any resource → Properties → Resource ID. You should now be able to read this ID fluently and understand every segment of it.
Checkpoint When you can look at any Azure resource ID and immediately tell someone: which subscription it's in, which resource group, what provider, and what resource type — you've internalised the hierarchy.

Check Your Understanding

Click any option to see immediate feedback. Answers represent the correct behaviour in a real Azure environment.

1. You assign a Contributor role at the Subscription scope. An engineer creates a new resource group inside that subscription. What access does the Contributor have on that resource group?

Role assignments at a parent scope are automatically inherited by all child scopes — including resource groups created after the assignment. This is one of the most important inheritance facts in Azure RBAC.

2. You apply an Azure Policy with a Deny effect to a Management Group. A subscription owner inside that management group tries to deploy a resource that violates the policy. What happens?

Azure Policy is enforced at the control plane level, before RBAC is even evaluated for resource creation. A Deny policy at the management group scope blocks deployments in all child subscriptions, regardless of whether the user is a subscription Owner.

3. You tag a resource group with CostCenter: Engineering. You then deploy a storage account into that resource group. What tag does the storage account have?

Tags are NOT inherited by default. The storage account has no tags unless you explicitly set them, or unless an Azure Policy using the "Inherit a tag from the resource group if missing" built-in definition is assigned. This is a very common exam trap.

4. Which scope level in Azure is the billing and service-limits boundary?

Subscriptions are the billing and service-limits boundary. While costs can be viewed at the resource group level, billing agreements, quotas (e.g. vCPU limits), and service limits are enforced at the subscription level. Management groups are governance-only.

5. What is the maximum depth of the management group hierarchy beneath the tenant root group?

The maximum depth is 6 levels beneath the tenant root management group. The total tree depth including root is therefore 7 levels. Microsoft recommends keeping it to 3–4 levels in practice for CAF compliance.

6. You need to apply a baseline security policy across all subscriptions in your tenant, including subscriptions that will be created in the future. Where is the most operationally correct place to assign this policy?

Assigning at the tenant root management group is the correct answer — policy assignments at this scope automatically apply to every subscription in the entire tenant, including new ones. This is the whole reason management groups exist.
Primary source for this lesson Management group and subscription organization — Azure Cloud Adoption Framework (Microsoft Learn)

This is Microsoft's canonical guidance on structuring the resource hierarchy for enterprise scale. Read the full design area and the linked subscription organization article before your next session.

Questions for your teacher (the AI agent)
This lesson covered the structure of the hierarchy. There are many things to go deeper on — ask your teacher to explore any of these:
  • How do you move a subscription between management groups?
  • What happens to resource locks during a resource group deletion?
  • How does the root management group behave differently from child management groups for RBAC elevation?
  • Walk me through designing a management group hierarchy for a company with 5 business units and 3 environments each.
Coming up: Lesson 02 — Microsoft Entra ID: Users, Groups & Service Principals Now that you understand where everything lives in Azure, the next lesson digs into who can access it. Entra ID is the identity plane that sits beneath the entire hierarchy. We'll cover users, groups, managed identities, and service principals — the four identity types you will manage every day as an Azure administrator.