Open in the explorer

Enable automatic MDM enrollment using default Azure AD credentials

Activer l'inscription MDM automatique en utilisant des informations d'identification Azure AD par défaut

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Windows Components › MDM FR: Configuration ordinateur › Stratégies › Modèles d'administration › Composants Windows › GPM
Supported on
At least Windows 10 FR: Au minimum Windows 10
ADMX file
MDM.admx
Internal name
MDM/MDM_JoinMDM_DisplayName

Explanation

This policy setting specifies whether to automatically enroll the device to the Mobile Device Management (MDM) service configured in Azure Active Directory (Azure AD). If the enrollment is successful, the device will remotely managed by the MDM service.

Important: The device must be registered in Azure AD for enrollment to succeed.

If you do not configure this policy setting, automatic MDM enrollment will not be initiated.

If you enable this policy setting, a task is created to initiate enrollment of the device to MDM service specified in the Azure AD.

If you disable this policy setting, MDM will be unenrolled.

French text from Windows 11 26H2

Ce paramètre de stratégie spécifie s’il faut inscrire automatiquement l’appareil au service de gestion des appareils mobiles (MDM) configuré dans Azure Active Directory (Azure AD). Si l’inscription réussit, l'appareil sera géré à distance par le service MDM.

Important : l'appareil doit être inscrit dans Azure AD pour que l’inscription réussisse.

Si vous ne configurez pas ce paramètre de stratégie, l’inscription MDM automatique ne démarre pas.

Si vous activez ce paramètre de stratégie, une tâche est créée pour lancer l’inscription de l’appareil au service MDM spécifié dans Azure Active Directory.

Si vous désactivez ce paramètre de stratégie, l'inscription à MDM est annulée.

Registry

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\CurrentVersion\MDM
Value name
AutoEnrollMDM
StateValue written
EnabledREG_DWORD = 1
DisabledREG_DWORD = 0

PowerShell

PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.

Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.

Enable

# Enable: MDM/MDM_JoinMDM_DisplayName
$k = 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\MDM'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'AutoEnrollMDM' -Value 1 -Type DWord
# Select Credential Type to Use
# Possible options:
#   User Credential = 1
#   Device Credential = 2
Set-ItemProperty -Path $k -Name 'UseAADCredentialType' -Value 2 -Type DWord
# MDM Application ID
Set-ItemProperty -Path $k -Name 'MDMApplicationId' -Value '<value>' -Type String

Disable

# Disable: MDM/MDM_JoinMDM_DisplayName
$k = 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\MDM'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'AutoEnrollMDM' -Value 0 -Type DWord

Revert to "Not configured"

# Revert to "Not configured": MDM/MDM_JoinMDM_DisplayName
$k = 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\MDM'
Remove-ItemProperty -Path $k -Name 'AutoEnrollMDM' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'UseAADCredentialType' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'MDMApplicationId' -ErrorAction SilentlyContinue

Options (2)

LabelControlRegistry valueREG typeConstraints / details
Select Credential Type to Use:Sélectionnez le type d'informations d'identification à utiliser :UseAADCredentialTypeDropDrop-down listenumUseAADCredentialTypeREG_DWORD
Default choice (UI): #1
LabelValue
User CredentialREG_DWORD = 1
Device CredentialREG_DWORD = 2
MDM Application ID:ID de l’application MDM :MDMApplicationIdText boxtextMDMApplicationIdREG_SZ
Max length: 255

Availability

Windows Server