AnilG.anilgtech.com Join next batch

Labs Azure Virtual Desktop

Azure Virtual Desktop lab: Entra-joined, Intune-managed, near-zero cost

Build a one-VM AVD lab whose session hosts join Microsoft Entra ID and enrol in Intune automatically. No domain controller, no VPN, no inbound ports, and no extra licences if your users have Microsoft 365 E3, E5 or Business Premium.

Time ~2 hours Cost free Azure credit, then a few € / month Level Intermediate Updated 11 Nov 2026

What you'll build

  • A user signs in through Windows App or a browser and gets a full Windows 11 desktop.
  • Every new session host appears in Intune > Devices > Windows within minutes, ready for compliance and configuration policies.
  • The VM stays off unless someone connects, so the lab costs a few euros a month, or nothing while the Azure free credit lasts.

Build time: about 2 hours the first time, 30 minutes once you know it.

The lab in 60 seconds

Full walkthrough: build it step by step

An 11-minute narrated walkthrough of the whole lab, recorded from a real build: resource group and budget, Entra groups, network, host pool, the session host with Entra join + Intune enrolment, roles, cost controls, checks in Entra and Intune, signing in as a user, and the three real problems we hit along the way.

Full lab walkthrough with narration · 11 min

Architecture and design

The session host joins Entra ID and enrols in Intune by itself Lab design: one resource group, one session host, no inbound ports Student laptopWindows Appor web browser Azure subscriptionrg-avd-lab · your region Azure Virtual Desktop service Workspace: ws-avd-labDesktop app group: hp-avd-lab-DAGHost pool: hp-avd-lab · pooled · max 4Single sign-on on vnet-avd-lab / snet-avdNSG: no inbound ports avdlab-0 (session host) Win 11 Enterprise multi-sessionStandard_D2s_v5 · 2 vCPU · 8 GBStandard SSD · no public IPEntra joined · Intune enrolledStart VM on Connect + auto-stop Microsoft 365 tenantMicrosoft 365 E3 Entra IDAVD-Lab-UsersVM User Login roleDevice joinSSO: Cloud Login IntuneAVD-SessionHostsSettings catalogcompliance connectoutbound onlyEntra joinIntune enrol

The user connects through the AVD service; the session host only makes outbound connections, so no inbound ports are open. While the VM is built it joins Entra ID and enrols in Intune, then picks up Settings catalog policies through the AVD-SessionHosts group.

Design decisionLab choiceWhy
IdentityMicrosoft Entra joined (no domain controller)Cheapest and simplest; enables automatic Intune enrolment
Host pool typePooled, Windows 11 Enterprise multi-sessionSeveral users share one VM
Session hosts1 × Standard_D2s_v5Smallest size Microsoft lists for a light workload
User profilesLocal profiles (no FSLogix)Lab users don't need roaming profiles; saves a storage account
NetworkOne VNet, no public IP, no inbound NSG rulesAVD uses outbound reverse connect only
ManagementIntune, Settings catalog policiesTemplates and update rings don't apply to multi-session

Cost plan: run it for almost nothing

You pay only for Azure compute and disk; the AVD service and the Windows licence are covered by eligible Microsoft 365 licences. The biggest saving is keeping the VM deallocated (stopped) except when it's in use.

Cost itemLab choiceWhat you pay
AVD service + Windows 11 multi-session licenceMicrosoft 365 E3, E5 or Business Premium0
Intune + Entra ID P1Included in Microsoft 365 E30
Azure subscriptionAzure free account: USD 200 credit for 30 days (Microsoft)0 while credit lasts
Session host VM1 × Standard_D2s_v5, Start VM on Connect + auto-shutdownPer running hour only, roughly €0.10–0.15 (approximate)
OS disk127 GB Standard SSDCharged even when the VM is off, roughly €8–10 / month (approximate)
NetworkVNet, subnet, NSG, no public IP0
  1. Create a budget alert at €10 on the subscription before anything else.
  2. Use one session host; add a second only to demo load balancing.
  3. Turn on Start VM on Connect and a nightly auto-shutdown.
  4. Between uses, delete the session host VM and its disk; recreate it in 15 minutes from the host pool.

Prices are approximate and change by region; check the Azure pricing calculator before you build.

Prerequisites and licences

Most tenants with Microsoft 365 E3 already meet every item except the Azure subscription; check each one before you start.

RequirementWhyHow to check
Eligible user licence: Microsoft 365 E3, E5, Business Premium, or Windows Enterprise E3/E5 (licensing)Right to use AVD and Windows 11 Enterprise multi-sessionAdmin center > Billing > Licenses
Intune licenceTo enrol and manage the session hostsIncluded with the licences above
MDM user scope = AllLets Entra-joined VMs enrol automaticallyIntune > Enrollment > Automatic Enrollment
Users may join devices to EntraSession hosts join Entra IDEntra > Devices > Device settings
Azure subscription in the same Entra tenant as IntuneEntra join only joins VMs to the subscription's own tenant (Microsoft Learn)To create, signed in as your tenant admin
Owner, or Contributor + User Access AdministratorTo create resources and assign rolesSubscription > Access control (IAM)
Test user with an eligible licenceTo sign in to the desktopCreate [email protected]
Trap to avoid: sign up for the Azure subscription with your work (tenant) admin account, not a personal account. A subscription created from a personal account lands in a different tenant, and Intune enrolment then fails.

Phase 1 · 20 min

Tenant and Intune preparation

  1. Check automatic enrolment. Intune admin center > Devices > Enrollment > Windows > Automatic Enrollment: MDM user scope = All.
  2. Check device join. Entra admin center > Devices > Device settings: Users may join devices to Microsoft Entra = All.
  3. Create the user group AVD-Lab-Users (security, assigned). Add [email protected] and give that user an eligible licence.
  4. Create the admin group AVD-Lab-Admins and add your admin account.
  5. Create a dynamic device group AVD-SessionHosts with this rule, so every new session host gets your policies automatically:
    (device.displayName -startsWith "avdlab")
  6. Turn on Entra authentication for RDP (needed for single sign-on): Entra admin center > Devices > Remote connection configuration > Windows Cloud Login > Enable Microsoft Entra ID authentication protocol > Save (steps).

Intune policies for multi-session hosts must come from the Settings catalog; templates (except certificates) and Windows Update rings don't apply to Windows Enterprise multi-session (Microsoft Learn).

Phase 2 · 20 min

Azure foundation

  1. Create the subscription. Go to the Azure free account page, sign in with your work (tenant) admin account, and finish sign-up. A card is needed for identity checks; the free credit is used first.
  2. Set a budget alert. Cost Management > Budgets > Add: €10 per month, email alerts at 50%, 80% and 100%.
  3. Register resource providers. Subscription > Resource providers: confirm Microsoft.DesktopVirtualization, Microsoft.Compute and Microsoft.Network are Registered.
  4. Create the resource group rg-avd-lab in the region closest to your users (for example West Europe or East US).
  5. Create the virtual network vnet-avd-lab: address space 10.20.0.0/16, subnet snet-avd = 10.20.1.0/24, Azure-provided DNS.
  6. Create a network security group nsg-avd-lab with the default rules only and attach it to snet-avd. AVD needs no inbound ports; the session host connects out to the service.
ResourceName
Resource grouprg-avd-lab
Virtual network / subnetvnet-avd-lab / snet-avd
Host poolhp-avd-lab
Workspacews-avd-lab
Desktop application grouphp-avd-lab-DAG
Session host prefixavdlab (VMs become avdlab-0, avdlab-1)

Phase 3 · 30 min

Create the host pool with Entra join and Intune enrolment

Azure portal > Azure Virtual Desktop > Host pools > Create. Fill each tab as below; everything not listed stays at its default.

TabSettingLab value
BasicsResource group / Host pool namerg-avd-lab / hp-avd-lab
BasicsLocationSame region as the resource group
BasicsValidation environmentYes (gets new AVD features first; fine for a lab)
BasicsPreferred app group typeDesktop
BasicsHost pool type / Load balancingPooled / Breadth-first
BasicsMax session limit4
Session hostsAdd virtual machinesYes
Session hostsName prefix / Number of VMsavdlab / 1
Session hostsImageWindows 11 Enterprise multi-session (latest, without Microsoft 365 apps)
Session hostsSizeStandard_D2s_v5 (2 vCPU, 8 GB)
Session hostsOS diskStandard SSD
Session hostsNetwork / Public IPvnet-avd-lab / snet-avd, No public IP
Session hostsDomain to joinMicrosoft Entra ID
Session hostsEnroll VM with IntuneYes
Session hostsLocal adminavdadmin + a strong password kept in a password manager
WorkspaceRegister desktop app groupYes, new workspace ws-avd-lab
Tagsenvlab
The two highlighted rows are the whole trick. Choosing Microsoft Entra ID shows the Enroll VM with Intune option, and the VM joins and enrols with device credentials as it's built (Microsoft Learn).

Select Review + create > Create. Deployment takes 15–20 minutes. When it finishes, Host pools > hp-avd-lab > Session hosts shows avdlab-0 as Available.

Standard_D2s_v5 is Microsoft's minimum for a light workload; for more than 2–3 users at once, use Standard_D4s_v5 (4 vCPU, 16 GB) (sizing guidelines).

Phase 4 · 15 min

Users, app group and access roles

Entra-joined session hosts need one extra role on top of the app group assignment, or users connect and then see "The sign-in method you're trying to use isn't allowed".

WhoAssignWhereWhy
AVD-Lab-UsersDesktop Virtualization User (app group Assignments)hp-avd-lab-DAGShows the desktop in Windows App
AVD-Lab-UsersVirtual Machine User Loginrg-avd-labLets users sign in to Entra-joined VMs
AVD-Lab-AdminsVirtual Machine Administrator Loginrg-avd-labLocal admin on the session hosts
Host pool managed identity or AVD service principalDesktop Virtualization Power On Contributorrg-avd-labNeeded for Start VM on Connect
  1. Single sign-on: Host pools > hp-avd-lab > RDP Properties > Connection information > Microsoft Entra single sign-on = Connections will use Microsoft Entra authentication to provide single sign-on > Save. The RDP property behind it:
    enablerdsaadauth:i:1
  2. Start VM on Connect: host pool > Properties > Start VM on connect = Yes > Save.

Phase 5 · 15 min

Verify in Intune and connect as a user

All six ticked? The lab is ready. Your ticks are saved in this browser only.

Cost control and clean-up

WhenActionWhere
Every eveningAuto-shutdown (deallocates the VM)VM avdlab-0 > Operations > Auto-shutdown
During useStart VM on Connect powers it on for the first userHost pool properties
WeeklyCheck spend against the €10 budgetCost Management > Cost analysis
Between usesDelete the VM, its OS disk and NIC; keep host pool, workspace and VNet (they cost nothing)rg-avd-lab
Next timeHost pool > Session hosts > Add one VM with the same settings; it joins Entra and enrols in Intune againHost pool
End of the labDelete the device in Intune and Entra, then delete rg-avd-labIntune, Entra, Azure portal

On the free account, Azure stops services when the USD 200 credit or 30 days run out unless you upgrade to pay-as-you-go; your budget alert still protects you after upgrading.

Troubleshooting

SymptomLikely causeFix
VM is Entra joined but not in IntuneMDM user scope not All, or subscription in a different tenantSet MDM scope to All; check the subscription's directory is your Microsoft 365 tenant, then re-add the session host
The sign-in method you're trying to use isn't allowedMissing Virtual Machine User Login roleAssign it to AVD-Lab-Users on rg-avd-lab
Web, Mac or phone client fails to sign inSingle sign-on not enabledTurn on Microsoft Entra single sign-on, or add targetisaadjoined:i:1 (password-only fallback) (RDP properties)
Desktop not visible in Windows AppUser not in the app group assignmentAdd AVD-Lab-Users to hp-avd-lab-DAG > Assignments
Session host shows UnavailableVM stopped, or agent still updatingStart the VM; wait 5 minutes; restart if it stays Unavailable
Intune policy shows Not applicable or failsTemplate policy or update ring used on multi-sessionRecreate it in the Settings catalog
VM doesn't start on connectPower On Contributor role missingAssign Desktop Virtualization Power On Contributor at resource group or subscription

Adapting this lab to your tenant

The guide uses example names; swap in your own before you build.

Example in this guideReplace with
contoso.com, [email protected]Your domain and a licensed test user
rg-avd-lab, hp-avd-lab, ws-avd-labYour own naming convention
Session host prefix avdlabYour prefix; update the AVD-SessionHosts rule to match
10.20.0.0/16Any range that doesn't overlap your other networks
€10 budgetYour own monthly limit

Sources: Microsoft Learn pages linked throughout this guide, checked 11 Nov 2026.

Want to build this live, with help?

This lab is part of my hands-on Azure Virtual Desktop and Intune training. Small batches, live online, real tenant.