TenantPlus

Microsoft 365 Tenant-Verwaltung

Kategorie Benutzer
Beschreibung Exportiert den MFA-Status aller Benutzer als CSV.

Parameter eingeben

Skript-Vorschau

Connect-MgGraph -TenantId "{{TENANT_DOMAIN}}" -Scopes "UserAuthenticationMethod.Read.All", "User.Read.All"
$users = Get-MgUser -All -Property DisplayName,UserPrincipalName
$result = foreach ($user in $users) {
    $methods = Get-MgUserAuthenticationMethod -UserId $user.Id
    [PSCustomObject]@{
        Name = $user.DisplayName
        UPN = $user.UserPrincipalName
        MFA_Methoden = ($methods.AdditionalProperties["@odata.type"] -join ", ")
    }
}
$result | Export-Csv -Path ".\mfa-status.csv" -NoTypeInformation -Encoding UTF8
Write-Host "MFA-Export abgeschlossen: mfa-status.csv"