In-app reader
Published: 2026-08-21. Last Updated: 2026-08-21 02:47:00 UTC
by Rob VandenBrink (Version: 1)
0 comment(s)
In every MFA rollout, there will come a time where you think you are closing in on "done", and some automation to list what's left would be handy. Something quicker than scrolling through the web interface through thousands of accounts ...
This is that method.
Also, remember when we discussed yesterday about the beta graph commands in the Microsoft.Graph.Beta library? We'll use one of those beta commands here!
Import-Module -Name Microsoft.Graph.Beta.Reports
Connect-MgGraph -Scopes "AuditLog.Read.All", "User.Read.All"
$AllMFADetails = Get-MgBetaReportAuthenticationMethodUserRegistrationDetail -All
$NonMFAUsers = $AllMFAdetails | Where-Object { $_.IsMfaRegistered -eq $false }
$t = foreach ($User in $NonMFAUsers) {
$UserObj = Get-MgUser -UserId $User.Id -Select Id, AccountEnabled
[PSCustomObject]@{
"UserPrincipalName" = $User.UserPrincipalName
"DisplayName" = $User.UserDisplayName
"AccountEnabled" = $UserObj.AccountEnabled
"MethodsRegistered" = ($User.UserPreferredMethodForSignIn -join ", ")
}
}
$t | Out-GridView -Title "NON-MFA Users"
Note that the last two columns are for MFA methods, so they'll be blank, but we'll use those in a sec.
I'm not displaying the output in this case, as it's essentially a list of actual user accounts.
You can also modify this a bit, for instance if you were tightening up your MFA setup, because your auditor told you to root out folks using SMS for MFA for instance, this is definitely the command set to use. You'd want $_.IsMfaRegistered -eq $true , but then look for "SMS" in the Methods registered or Default MFA columns. Surprisingly in this last check I saw a number of folks with "voiceMobile" (ie a voice callback) as their primary MFA.
Give this a try, let us know in the comments if you find some unexpected folks who skated by the MFA login policy requirements ....
===============
Rob VandenBrink
[email protected]
Keywords: entra graph mfa Powershell
0 comment(s)
Discussion
Sign in to join the discussion.
Keep reading
Optional: create a free account to save items, track programs, and sync across web + app. Reading stays free.