Link to home
Start Free TrialLog in
Avatar of Dewey Rodriguez
Dewey Rodriguez

asked on

MFA Status issue

I had this question after viewing Powershell command to find 2FA status on Office365.

When I ran the command the MFA status is coming up blank. I know that we have over 100 users that have it enforced. What am I doing wrong?
Avatar of Vasil Michev (MVP)
Vasil Michev (MVP)
Flag of Bulgaria image

Which cmdlet might that be exactly? In general, this example should do just fine:

Get-MsolUser -All | where {$_.StrongAuthenticationMethods.Count -ne 0} | Select-Object -Property UserPrincipalName

Open in new window


More info on reporting for MFA can be found in this article: https://docs.microsoft.com/en-us/azure/active-directory/authentication/howto-mfa-reporting
Avatar of Dewey Rodriguez
Dewey Rodriguez

ASKER

Hi Vasil, Thank you for the quick response. Herei is the command I am using

Get-msoluser -All | select UserPrincipalName,@{N='MFA State';E={($_.StrongAuthenticationRequirements.State)}} | Export-Csv -NoTypeInformation C:\Temp\Report.csv
Your example also runs fine for me. Here's a little tweak that should return just the users that have it set to Enforced:

Get-MsolUser -All | ? {$_.StrongAuthenticationRequirements.State -eq "Enforced"} | select UserPrincipalName,@{N='MFA State';E={($_.StrongAuthenticationRequirements.State)}}

Open in new window


Do note that if you are enforcing MFA via Conditional access policies, this will not be reflected in the StrongAuthenticationRequirements attribute, thus using the StrongAuthenticationMethods can be a better indicator (also not 100% correct all the time).
I think I know the issue. When I check in Azure, it shows we do not have a MFA server. I joined this company recently and just found out they enabled MFA to the user via the O365 console. O365 Admin console-Home-Active Users-More.
ASKER CERTIFIED SOLUTION
Avatar of Vasil Michev (MVP)
Vasil Michev (MVP)
Flag of Bulgaria image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you very much. I am not sure what I was doing wrong, but it magically appeared.