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?
Dewey RodriguezAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Vasil Michev (MVP)Commented:
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
0
Dewey RodriguezAuthor Commented:
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
0
Vasil Michev (MVP)Commented:
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).
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Dewey RodriguezAuthor Commented:
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.
0
Vasil Michev (MVP)Commented:
If it's enabled in O365, it should show up in the output of Get-MsolUser.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Dewey RodriguezAuthor Commented:
Thank you very much. I am not sure what I was doing wrong, but it magically appeared.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Powershell

From novice to tech pro — start learning today.