← Back to articles Intune

Mastering Autopilot Device Preparation (Autopilot v2): Enterprise Setup, ESP Fixes & Architecture

Mastering Autopilot Device Preparation (Autopilot v2): Enterprise Setup, ESP Fixes & Architecture

For years, Windows Autopilot v1 required enterprise IT teams to harvest 4K Hardware Hashes from physical endpoints prior to staging. This dependency introduced supply chain bottlenecks, vendor delays, and dynamic group sync latency. With the release of Windows Autopilot Device Preparation (Autopilot v2), Microsoft fundamentally redesigned out-of-box provisioning by introducing user-group targeting and automatic Entra device object group membership.

Major Advantage of Autopilot v2 No more CSV uploads of 4K hardware hashes! Devices are dynamically assigned to target security groups by the Intune Autopilot Service Principal as soon as an authorized user signs in during Out-of-Box Experience (OOBE).

1. Architectural Comparison: v1 vs v2 Flow

Under Autopilot v1, devices had to be registered in the corporate tenant's hardware hash database before enrollment could begin. Autopilot v2 reverses this workflow: enrollment begins immediately when a targeted user authenticates at OOBE, and Intune automatically manages device group membership in real time.

AUTOPILOT V1 (HARDWARE HASH DEPENDENT) 1. Harvest Hash 2. Upload Hash CSV 3. Sync Dynamic Group 4. OOBE ESP Sync (Slow) AUTOPILOT V2 (DEVICE PREPARATION - NO HASH NEEDED) 1. User Signs in at OOBE 2. Intune SP Inserts to Device Group 3. Fast Direct App Provisioning
Figure 1: Architectural workflow comparison between Autopilot v1 (hardware hash sync) and Autopilot v2 Device Preparation.

2. Technical Feature Matrix

Provisioning Requirement Autopilot v1 Autopilot v2 (Device Preparation)
Hardware Hash Harvesting Mandatory (CSV or OEM Registration) Not Required (Zero Hash Collection)
Device Grouping Mechanism Dynamic Device Groups (Sync Latency) Assigned Group (Real-time Service Principal Injection)
User Assignment Target Assigned Per-Device Object Assigned Per-User Security Group
Supported Join Types Entra Join & Hybrid Entra Join Entra Join Only (Cloud Native)
Maximum Blocking Apps Limit No strict programmatic cap Max 10 Apps & 10 Scripts (Strict Policy Limit)

3. Service Principal Ownership & PowerShell Automation

For Autopilot Device Preparation to successfully inject newly enrolled devices into your target Device Security Group, the Intune Autopilot Confidential Client service principal (App ID: f1346770-5b25-470b-88bd-d5744ab7952c) MUST be assigned as an **Owner** of the target Security Group.

# Connect to Microsoft Graph with Directory Administration Scopes
Connect-MgGraph -Scopes "Group.ReadWrite.All", "Directory.ReadWrite.All"

$targetGroupName = "Sec-Intune-AutopilotV2-CorporateDevices"
$group = Get-MgGroup -Filter "displayName eq '$targetGroupName'"

if (-not $group) {
    $group = New-MgGroup -DisplayName $targetGroupName -MailEnabled:$false -MailNickname "autopilotv2devs" -SecurityEnabled:$true
    Write-Host "Created assigned Security Group: $($group.Id)" -ForegroundColor Cyan
}

# Retrieve First-Party Autopilot Service Principal
$autopilotAppId = "f1346770-5b25-470b-88bd-d5744ab7952c"
$sp = Get-MgServicePrincipal -Filter "appId eq '$autopilotAppId'"

# Assign Autopilot SP as Owner of the Device Group
New-MgGroupOwnerByRef -GroupId $group.Id -OdataId "https://graph.microsoft.com/v1.0/directoryObjects/$($sp.Id)"

Write-Host "Autopilot Service Principal granted Owner rights over ($targetGroupName)" -ForegroundColor Green

4. Step-by-Step Policy Configuration Guide

  1. Create Target Assigned Security Groups: Create one empty assigned Security Group for Devices and one User Group containing targeted end users.
  2. Grant Service Principal Owner Rights: Execute the PowerShell script above to assign the Intune Autopilot service principal as an owner.
  3. Configure Device Preparation Policy: In Intune Admin Center (Devices → Enrollment → Device Preparation Policies), click Create Policy.
  4. Select Deployment Settings: Assign the User Group, link the Device Group, and select up to 10 blocking Win32/LOB apps and 10 PowerShell scripts.

5. Resolving ESP Reboot Loops & Log Diagnostics

Critical ESP Reboot Loop Failure Vector If an assigned Win32 app triggers an unexpected reboot or returns exit code 1641/3010 during the Enrollment Status Page phase without proper Intune exit code handling, the ESP session will freeze and fail with error 0x800705b4 (Timeout). Always package pre-logon apps in SYSTEM Context with suppressed reboots.

When an Autopilot v2 deployment fails on a physical device, run the following diagnostic script to parse the local provisioning registry and Intune Management Extension logs:

# Check Autopilot Local Registry State
Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Provisioning\AutopilotPolicy" -ErrorAction SilentlyContinue

# Extract Last 15 Error Events from Intune Management Extension Log
$logFile = "C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\IntuneManagementExtension.log"
Select-String -Path $logFile -Pattern "\[Win32App\]" -Context 0,2 | Select-Object -Last 10

To monitor enterprise Autopilot enrollment failures across all devices in Azure Monitor, execute this KQL query:

// KQL Query: Autopilot Device Preparation Enrollment Failures
IntuneOperationalLogs
| where OperationName == "EnrollmentStatusPageFailure"
| summarize FailureCount = count() by DeviceName, UserPrincipalName, ErrorCode, ResultDescription
| order by FailureCount desc

6. Frequently Asked Questions (FAQ) - MSLearn Specifications

Q: Can Autopilot v1 and Autopilot v2 coexist in the same tenant?

Yes. If a device has a registered 4K Hardware Hash, Autopilot v1 takes precedence. If no hardware hash is present and the signing-in user is assigned an Autopilot v2 Device Preparation policy, v2 is executed.

Q: Is Hybrid Entra Join supported in Autopilot v2?

No. Microsoft Autopilot Device Preparation (v2) strictly supports **Entra Join** (Cloud Native). Hybrid Entra Join is intentionally excluded by design.

7. Conclusion

Autopilot Device Preparation streamlines enterprise deployment by eliminating supply-chain hardware hash collection while accelerating Out-of-Box provisioning speeds. Transitioning to v2 delivers a clean, resilient Cloud Native foundation for modern Windows 11 management.

Master Microsoft Intune & MD-102 Certification

Practice with real-world Intune enrollment labs, Win32 packaging scenarios, and practice exams on MS Endpoint Academy.

Access Intune Courses →

Was this article helpful?

🎯
MSEndpoint Academy

Évaluez vos compétences Microsoft 365 & Intune (MD-102)

100% Gratuit • 5 Min

Vous appliquez ce guide en production ? Testez votre niveau technique face aux questions réelles de l'examen Microsoft 365 Certified: Endpoint Administrator (MD-102). Découvrez vos points forts et vos faiblesses immédiatement.

💡 Mini-Challenge Express Question 1 sur 10

Quel outil est obligatoire pour convertir une application Win32 (.exe) au format requis (.intunewin) pour son déploiement via Microsoft Intune ?

🔒 0€ Débité 📊 Scorecard instantanée 🤖 Explications IA
Passer le Test Diagnostic Complet (10 Questions)

🎓 Ready to go deeper?

Practice real MD-102 exam questions, get AI feedback on your weak areas, and fast-track your Intune certification.

Start Free Practice → Book a Session
Souhaiel Morhag
Souhaiel Morhag
Microsoft Endpoint & Modern Workplace Engineer

Souhaiel Morhag is a Microsoft Intune and endpoint management specialist with hands-on experience deploying and securing enterprise environments across Microsoft 365. He founded MSEndpoint.com to share practical, real-world guides for IT admins navigating Microsoft technologies — and built the MSEndpoint Academy at app.msendpoint.com/academy, a dedicated learning platform for professionals preparing for the MD-102 (Microsoft 365 Endpoint Administrator) certification. Through in-depth articles and AI-powered practice exams, Souhaiel helps IT teams move faster and certify with confidence.

Related Articles

Popular on MSEndpoint