Enable automatic MDM enrollment using default Azure AD credentials: registry value AutoEnrollMDM and 2 moreComputerHKLM\Software\Policies\Microsoft\Windows\CurrentVersion\MDM
- Policy ID
- MDM_JoinMDM_DisplayName
- Scope
- Computer Configuration
- Supported on
- At least Windows 10
- Source
- Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (version 1.0)
- Category
- Windows Components › MDM
Registry
AutoEnrollMDM
REG_DWORDComputer- Enabled value
- 1
- Disabled value
- 0
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\CurrentVersion\MDM] ; Options (use only one) ; Enabled "AutoEnrollMDM"=dword:00000001 ; Disabled "AutoEnrollMDM"=dword:00000000
CMD
:: Options (use only one) :: Enabled reg add "HKLM\Software\Policies\Microsoft\Windows\CurrentVersion\MDM" /v "AutoEnrollMDM" /t REG_DWORD /d 1 /f :: Disabled reg add "HKLM\Software\Policies\Microsoft\Windows\CurrentVersion\MDM" /v "AutoEnrollMDM" /t REG_DWORD /d 0 /f
PowerShell
# Common: create the key New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\MDM' -Force | Out-Null # Options (use only one) # Enabled New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\MDM' -Name 'AutoEnrollMDM' -PropertyType DWord -Value 1 -Force | Out-Null # Disabled New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\MDM' -Name 'AutoEnrollMDM' -PropertyType DWord -Value 0 -Force | Out-Null
UseAADCredentialType
REG_DWORDComputer- Enabled value
- Depends on the option value
- Element
- Select Credential Type to Use:
| Item | Stored value |
|---|---|
| User Credential | 1 |
| Device Credential | 2 |
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\CurrentVersion\MDM] ; Options (use only one) ; User Credential "UseAADCredentialType"=dword:00000001 ; Device Credential "UseAADCredentialType"=dword:00000002
CMD
:: Options (use only one) :: User Credential reg add "HKLM\Software\Policies\Microsoft\Windows\CurrentVersion\MDM" /v "UseAADCredentialType" /t REG_DWORD /d 1 /f :: Device Credential reg add "HKLM\Software\Policies\Microsoft\Windows\CurrentVersion\MDM" /v "UseAADCredentialType" /t REG_DWORD /d 2 /f
PowerShell
# Common: create the key New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\MDM' -Force | Out-Null # Options (use only one) # User Credential New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\MDM' -Name 'UseAADCredentialType' -PropertyType DWord -Value 1 -Force | Out-Null # Device Credential New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\MDM' -Name 'UseAADCredentialType' -PropertyType DWord -Value 2 -Force | Out-Null
MDMApplicationId
REG_SZComputer- Enabled value
- Depends on the option value
- Element
- MDM Application ID:
- Value type
- REG_SZ
- Maximum length
- 255
- Required
- false
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\CurrentVersion\MDM] ; Value names and types follow the ADMX. Replace <enter value> below with your own data "MDMApplicationId"="<enter value>"
CMD
:: Value names and types follow the ADMX. Replace <enter value> below with your own data reg add "HKLM\Software\Policies\Microsoft\Windows\CurrentVersion\MDM" /v "MDMApplicationId" /t REG_SZ /d "<enter value>" /f
PowerShell
# Value names and types follow the ADMX. Replace <enter value> below with your own data New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\MDM' -Force | Out-Null New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\MDM' -Name 'MDMApplicationId' -PropertyType String -Value '<enter value>' -Force | Out-Null