BlogTopicsAboutSubscribe
Hands-On Lab25 min read

Build Your IAM Homelab
For Free: The Complete Guide

Deploy Active Directory, connect it to Entra ID, configure Conditional Access and MFA, and build the exact hybrid identity environment that Fortune 500 companies run — all on a free Azure account. This is the lab that gets you hired.

MR
Syed Masood RazaIAM Architect · 24+ years · Fortune 500 SME

In my first post, I told you to "deploy Active Directory in your lab." I did not show you how. This post fixes that.

What you are about to build is not a toy. It is a scaled-down version of the exact hybrid identity architecture that I have deployed for Fortune 500 companies — an on-premises Active Directory domain synchronised to Microsoft Entra ID, with Conditional Access, MFA, and user lifecycle management.

The difference? You are building it for free. Everything in this guide uses either free Azure credits, free evaluation licences, or permanently free tiers.

By the end of this guide, you will have:

What you need before starting

A computer with internet access. No prior lab experience needed. Set aside 3–4 hours for the initial build. Total cost: /bin/sh.

Architecture

What You Are Building

Before touching a single button, understand the architecture. This is how enterprise hybrid identity works — and your lab will mirror it.

Your homelab architecture
Windows Server 2022
Active Directory DS
DNS Server
Domain Controller
Entra Connect
Syncs users & groups
Password hash sync
Hybrid identity bridge
Microsoft Entra ID
Cloud identity
Conditional Access
MFA · SSPR · SSO

Active Directory is the source of truth. Entra Connect synchronises identities to the cloud. Entra ID applies security policies. This is hybrid identity — what 90% of enterprises run.

Phase 1

Create Your Free Azure Account

  1. Go to azure.microsoft.com/free and click "Start free." Sign in with your Microsoft account or create one.
  2. Complete identity verification. You need a phone number and a card for verification only — you will not be charged. Microsoft gives you 00 in free credits.
  3. Access the Azure Portal at portal.azure.com. You now have a working Azure subscription.
Credit card note

Azure requires a card for verification but will not charge you unless you explicitly upgrade. The 00 free credit covers this entire lab easily — a Windows Server VM costs roughly /bin/sh.05/hour.

Phase 2

Deploy a Windows Server VM

Create a Resource Group

In the Azure Portal, search for "Resource Groups" → Click Create.

Resource Group settings
Subscription: Your free subscription Resource Group: rg-iam-homelab Region: East US

Create the Virtual Machine

Search for "Virtual Machines" → Click Create → Azure Virtual Machine.

VM settings
Resource Group: rg-iam-homelab VM Name: DC01 Region: East US Image: Windows Server 2022 Datacenter Size: Standard_B2s (2 vCPU, 4 GB RAM) Username: labadmin Password: (strong password) Public inbound ports: Allow RDP (3389)

Click Review + Create → Create. Deployment takes 2–4 minutes. Then Connect → RDP → download the file and log in.

Phase 3

Install Active Directory Domain Services

Set a Static IP (Critical)

Before installing AD, set your VM's private IP to static: VM → Networking → Network Interface → IP configurations → Change to Static → Save.

Why static IP matters

Active Directory relies on DNS, and DNS relies on a consistent IP. If your DC's IP changes, the entire domain breaks. In production, this is always static.

Install AD DS via Server Manager

  1. Open Server Manager → Add roles and features
  2. Check "Active Directory Domain Services" → Add Features
  3. Click Install and wait 2–3 minutes

Promote to Domain Controller

Click the yellow notification flag → "Promote this server to a domain controller."

Domain configuration
Select: Add a new forest Root domain name: iamlab.local Forest/Domain level: Windows Server 2016 DSRM Password: (save this) NetBIOS name: IAMLAB

Install → server restarts. Log back in as IAMLAB\labadmin. You have a working Active Directory domain.

Phase 4

Build Your Domain Structure

Create Organisational Units

Open Active Directory Users and Computers (ADUC). Right-click your domain → New → Organisational Unit:

iamlab.local ├── OU=Corporate │ ├── OU=Users │ ├── OU=Groups │ ├── OU=Computers │ └── OU=Service Accounts ├── OU=IT │ ├── OU=IT-Users │ └── OU=IT-Groups └── OU=Disabled Accounts

Create Test Users via PowerShell

# Create 10 test users = "OU=Users,OU=Corporate,DC=iamlab,DC=local" = ConvertTo-SecureString "P@ssw0rd2026!" -AsPlainText -Force = @( @{First="Sarah";Last="Chen";Title="IAM Analyst"}, @{First="James";Last="Wilson";Title="Security Engineer"}, @{First="Priya";Last="Sharma";Title="Cloud Admin"}, @{First="Michael";Last="Johnson";Title="IT Manager"}, @{First="Fatima";Last="Ali";Title="Helpdesk Analyst"}, @{First="David";Last="Lee";Title="Network Engineer"}, @{First="Emma";Last="Martinez";Title="Compliance Officer"}, @{First="Ahmed";Last="Hassan";Title="DevOps Engineer"}, @{First="Lisa";Last="Thompson";Title="SOC Analyst"}, @{First="Raj";Last="Patel";Title="IAM Architect"} ) foreach ( in ) { = (.First[0] + .Last).ToLower() New-ADUser -Name " " -GivenName .First -Surname .Last -SamAccountName -UserPrincipalName "@iamlab.local" -Title .Title -Path -AccountPassword -Enabled Write-Host "Created: " -ForegroundColor Green }

Create Security Groups

# Create security groups = "OU=Groups,OU=Corporate,DC=iamlab,DC=local" @("SG-IAM-Admins","SG-Cloud-Admins","SG-Helpdesk", "SG-VPN-Users","SG-MFA-Enforced") | ForEach { New-ADGroup -Name -GroupScope Global -GroupCategory Security -Path Write-Host "Created: " -ForegroundColor Cyan } # Add members Add-ADGroupMember "SG-IAM-Admins" -Members "rpatel","schen" Add-ADGroupMember "SG-Cloud-Admins" -Members "psharma","dlee"

Create a Group Policy Object

  1. Open Group Policy Management
  2. Right-click Corporate OU → Create GPO → Name: "Password Policy - Corporate"
  3. Edit → Computer Config → Policies → Windows Settings → Security → Account Policies → Password Policy
  4. Set: Min length = 12, Complexity = Enabled, Max age = 90 days
Phase 5

Connect to Entra ID with Entra Connect

This is where your lab goes from "I set up AD" to "I built hybrid identity." This single step separates a homelab from an enterprise-grade lab.

  1. Verify your Entra ID tenant — Azure Portal → Microsoft Entra ID. Your free subscription includes one.
  2. Download Entra Connect V2 — on your DC VM, search microsoft.com/download for "Microsoft Entra Connect"
  3. Install with Express Settings — this enables Password Hash Sync (the most common production method)
  4. Enter Entra ID Global Admin credentials
  5. Enter AD DS Enterprise Admin credentials (IAMLAB\labadmin)
  6. Click Install
What just happened

Entra Connect is synchronising your on-premises AD users to the cloud. Every user you created — Sarah Chen, Raj Patel, all of them — now exists in both your on-prem AD and Entra ID. This is hybrid identity. This is what enterprises run.

Verify: Go to entra.microsoft.com → Users → All users. Your 10 users should appear with Source = "Windows Server AD."

Phase 6

Configure Conditional Access and MFA

Licence requirement

Conditional Access requires Entra ID P1. Activate the free 30-day P2 trial: Entra Portal → Licences → All products → Activate Entra ID P2 trial.

Policy 1: Require MFA for All Users

  1. Entra Portal → Protection → Conditional Access → New policy
  2. Name: "Require MFA — All Users"
  3. Users: All users (exclude your break-glass admin)
  4. Target resources: All cloud apps
  5. Grant: Require multifactor authentication
  6. Enable: Report-only first, then switch to On after testing

Policy 2: Block Legacy Authentication

  1. New policy → Name: "Block Legacy Auth"
  2. Users: All users
  3. Conditions → Client apps: Exchange ActiveSync + Other clients
  4. Grant: Block access
  5. Enable: On

Legacy auth protocols don't support MFA — blocking them is one of the first things you do in any enterprise.

Enable Self-Service Password Reset

  1. Entra Portal → Protection → Password reset
  2. Enabled: All
  3. Methods: Mobile app notification + Email
  4. Save

In production, SSPR alone reduces L1 ticket volume by 20–30%.

Phase 7

Document Everything — Build Your Portfolio

The portfolio effect

"I built a hybrid identity environment with AD, Entra Connect, Conditional Access, and SSPR — here is my documentation" is immediately more credible than only having certifications. Certifications show you studied. A lab shows you built.


Your Complete Lab Checklist


What to Build Next

"The lab is where theory becomes muscle memory. When an interviewer asks 'Have you configured Conditional Access?' your answer is not 'I studied it.' Your answer is 'I built it.'"

Go build it. The Azure free account takes 5 minutes. Your first domain controller takes 30 minutes. By tonight, you can have a working hybrid identity environment that matches what Fortune 500 companies run.

That is not a hobby project. That is a career.

Masood

IAM Architect · 24+ years · identityfrontline.com

Free resources