Forum Discussion
Report on users with MFA Enabled
- Feb 28, 2018
No, your users are not enabling MFA for themselves by using those URLs, That's a fact. You may have some other configuration going on.
Hi,
Sorry for the late response.
From my understating you wanted to know who got it setup before you forcefully enable it.
If a user setups MFA the value of "StrongAuthenticationMethods" will not be null
This should help:
Get-MsolUser -all | Select-Object DisplayName,UserPrincipalName,@{N="MFA User Setup"; E={ if( $_.StrongAuthenticationMethods -ne $null){"Enabled"} else { "Disabled"}}},@{N="MFA Admin Enforced"; E={ if( $_.StrongAuthenticationRequirements.State -ne $null){ $_.StrongAuthenticationRequirements.State} else { "Disabled"}}}
- cfizz3434Apr 20, 2022Copper Contributor
<the sign-in status can be blocked or allowed. i want to exclude blocked users from the report
- AliSoufiApr 20, 2022Copper ContributorGot it. so you just need to add a filter like this: Where-Object {$_.BlockCredential -eq $false}
the whole thing would look like something like this:
Get-MsolUser -all | Where-Object {$_.BlockCredential -eq $false} | Select-Object DisplayName,UserPrincipalName,@{N="MFA User Setup"; E={ if( $_.StrongAuthenticationMethods -ne $null){"Enabled"} else { "Disabled"}}},@{N="MFA Admin Enforced"; E={ if( $_.StrongAuthenticationRequirements.State -ne $null){ $_.StrongAuthenticationRequirements.State} else { "Disabled"}}}