Zum Inhalt
Kaffeeundcode
Skriptbibliothek
PowerShell 06.10.2026

PowerShell

Get MfaStatus

135_Get-MfaStatus.ps1

<#
.SYNOPSIS
    Prüft MFA Registrierungen (Authentication Methods).

.DESCRIPTION
    <!-- library-status:start -->
    Prüfstatus: Ungeprüft
    Windows- und Tenant-Abnahme ausstehend; keine pauschale Produktionsfreigabe.

    <!-- library-status:end -->

    Zeigt, welche Auth-Methoden ein User registriert hat (App, Phone etc.).
    Erfordert die Berechtigung 'UserAuthenticationMethod.Read.All'.

.NOTES
    File Name: 135_Get-MfaStatus.ps1
    Author: Mattia Cirillo
    Version: 1.0
#>

param (
    [string]$UserUPN
)

Connect-MgGraph -Scopes "UserAuthenticationMethod.Read.All"

$User = Get-MgUser -UserId $UserUPN
if ($User) {
    Get-MgUserAuthenticationMethod -UserId $User.Id | Select-Object @{N='Type';E={$_.AdditionalProperties['@odata.type']}}
}