Photo by Alexander Lam / Unsplash
Microsoft Intune Enrollment App manquante dans Microsoft Entra ID

Microsoft Intune Enrollment App manquante dans Microsoft Entra ID

Published on 07 May 2025

Bastien Perez
Bastien Perez

Clap

Vous ne trouvez pas l’application Microsoft Intune Enrollment dans votre tenant Microsoft 365 et vous en avez besoin pour une règle d’accès conditionnel ? Ce problème peut compliquer la gestion de l’accès ou l’exclusion du MFA. Bonne nouvelle : la solution se trouve dans cet article.

Microsoft Intune Enrollement manquant

Comme indiqué dans la documentation Microsoft - Require multifactor authentication for Intune device enrollments, l'application Microsoft Intune Enrollement n'est pas créée automatiquement pour les nouveaux tenants.

Microsoft Intune Enrollement est manquant dans la partie Mobility (MDM and WIP) - https://entra.microsoft.com/#view/Microsoft_AAD_IAM/MdmList.ReactView

Mais aussi dans les applications qui peuvent être choisies dans les stratégies d'accès conditionnels.

Créer l'application Microsoft Intune Enrollment manuellement

Pour créer l'application, on utilise Microsoft Graph avec un compte disposant des droits de création de Service Principal dans Entra ID, par exemple un utilisateur avec le rôle Global Administrator.

Pour ce script, il vous faudra le module PowerShell Microsoft.Graph.Authentication.

#Connecting with the required permissions
Connect-MgGraph -Scopes 'Application.ReadWrite.All'

$intuneEnrollmentAppUri = "https://graph.microsoft.com/v1.0/servicePrincipals?`$filter=appId eq 'd4ebce55-015a-49b5-a083-c84d1797ae8c'"
$intuneEnrollmentAppExists = [bool](Invoke-MgGraphRequest -Method GET -Uri $intuneEnrollmentAppUri -ContentType 'PSObject' -OutputType PSObject).value.Count -gt 0

# If not exist, we create it
if (-not $intuneEnrollmentAppExists) {

    $body = @{ appId = 'd4ebce55-015a-49b5-a083-c84d1797ae8c' } | ConvertTo-Json   

    $null = Invoke-MgGraphRequest -Method POST -Uri 'https://graph.microsoft.com/v1.0/servicePrincipals' -Body $body -ContentType 'application/json'
    Write-Host -ForegroundColor Green 'Microsoft Intune Enrollment created'
}
else {
    Write-Host -ForegroundColor Green 'Microsoft Intune Enrollment already exists'
}
💡
J'utilise Invoke-MgGraphRequest car il ne nécessite que le module Microsoft.Graph.Authentication. Les commandes comme New-MgServicePrincipal / Get-MgServicePrincipal peuvent fonctionner, mais les modules dont elles dépendent présentent souvent des problèmes de compatibilité ou des bugs, d'où l'intérêt d'utiliser Invoke-MgGraphRequest autant que possible.

Après cette action, Microsoft Intune Enrollement est disponible dans Mobility (MDM and WIP).

Et aussi dans la partie accès conditionnel :

Comments

banner-Bastien Perez
Bastien Perez

Freelance Microsoft 365 - Active Directory - Modern Workplace

France